Copied to clipboard

Flag this post as spam?

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


  • Graeme W 113 posts 289 karma points
    Apr 04, 2014 @ 16:47
    Graeme W
    0

    Can Examine be configured to search non-Umbraco tables?

    We are building a site that has some pages pulling in data from a separate back office database. Is it possible somehow to configure the built in Examine search to index these tables too, so they appear in the same search results as the Umbraco content?

    Thanks in advance for any advice

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Apr 04, 2014 @ 17:51
    Ismail Mayat
    0

    Graeme,

    You need to build your own indexer which is pretty straight forward in fact in the examine site there is some code see https://github.com/Shandem/Examine/wiki/Indexer and if you as it suggests download the sample app you will have some code. For the searching part you need to do multisearcher see http://our.umbraco.org/forum/developers/extending-umbraco/43877-Search-both-content-and-PDFs-in-a-single-examine-query then you can get results from both umbraco and your database I have done it in the past.

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Apr 04, 2014 @ 17:56
    Ismail Mayat
    0

    Graeme,

    One more thing with custom indexing you will need to create some kind of schedule to periodically rebuild the index because unlike umbraco content you do not have an event to tap into to add / update / delete item, so in umbraco when you publish page, that fires event and examine taps into that and puts item into index.

    With db table you do not have that so you have to periodically rebuild. One idea I did have though was sticking a trigger on db table so that when its updated etc that fires a trigger and then get that to make add to index call something along the lines of http://www.codeproject.com/Articles/19954/Execute-NET-Code-under-SQL-Server it just depends how often that db table gets updated and if you can live with once nightly rebuild then fine, but if it needs to be real time then this is an option.

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft