Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Corné Hoskam 81 posts 588 karma points MVP 3x c-trib
    Nov 02, 2021 @ 12:17
    Corné Hoskam
    0

    Examine Searching Umbraco + External Database Data

    Hi Umbracians!

    For a client running Umbraco 8.17 we are working on a Search & Filter implementation using Examine, and I am hoping we could get some advice from the community!

    The platform consists of a handful of different Umbraco Doctypes that we're searching through using Examine's/Umbraco's ExternalIndex. 90% of our content lives in Umbraco, so that's no problem at all. We're currently on the fence on what to do with the remaining 10%. One specific doctype in Umbraco is only used as a reference to data stored in an external database, and we don't have the option available to store that info in Umbraco within a Content Item (as a business rule). We are however interested in searching through several fields stored in said external database, next to all of our Umbraco content.

    We're currently envisioning two options, and we would like to hear which one you would choose: (Or recommend us a third option if out there!)

    1. Creating a completely new Index within Examine, and whenever we update our external database, we update that new Index. When searching through content as a frontend user, we would go through both the Umbraco ExternalIndex and our new index to find and display all the content we need from both sources.
    2. We extend the ExternalIndex with custom fields/data whenever we update our external database. When searching through content as a frontend user, we would only have to use the ExternalIndex.
    3. ??

    I would love to hear what you would recommend we do in this situation!

    Kind regards,

    Corné Hoskam

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Nov 02, 2021 @ 14:03
    Dave Woestenborghs
    101

    Hi Corné,

    With option one 1 you could retrieve the information from the database when the content item holding the reference is being indexed. But this will require you to write some mechanism to re-index the node when the data is changed in the database. The advantage is that you only have one index to query.

    With option two you can store all the information needed from the database in a custom index. That way you can update that index when something in the database changes without knowing the node that holds the reference. You can then use a multi index searcher to search for the data on both the external and your custom index. Downside is that your index does not know the relation between the node holding the reference and your content item. Which might lead to unwanted search results.

    Without knowing more details it is hard to recommend a correct approach.

    This article has some examples on creating custom indexes and multi index searchers : https://skrift.io/issues/examine-in-umbraco-8/

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft