Copied to clipboard

Flag this post as spam?

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


  • Felipe Cruz 6 posts 86 karma points
    Jul 20, 2016 @ 12:11
    Felipe Cruz
    0

    Override Umbraco Internal Searcher

    Hi,

    I have built a custom indexer in Umbraco v.7.3.0 expecting to override the current Umbraco Internal Search functionality.

    The aim

    To be able to search against custom data that I have stored in a custom table and not against Umbraco nodes.

    The problem

    The custom searcher that I created called "ProductsSearcher" is working completely fine as I can find products but I would like those results to be coming in the quick internal search. However, no results are being displayed at all.

    enter image description here

    My custom Examine Index provider:

      <!-- Custom provider for the Products table -->
      <add name="ProductsIndexer" type="Examine.LuceneEngine.Providers.SimpleDataIndexer, Examine"
           dataService="*****.Examine.ProductsTableDirectReaderDataService, ****.Library"
           supportUnpublished="false"
           supportProtected="false"
           indexTypes="ProductType"
           analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
           runAsync="true"
           enableDefaultEventHandler="true"
           />
    

    My custom Examine search provider:

    <providers>
      <add name="InternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
           analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
    
      <add name="ExternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine" />
    
      <add name="InternalMemberSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
           analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" enableLeadingWildcard="true"/>
    
      <add name="ProductsSearcher" type="Examine.LuceneEngine.Providers.LuceneSearcher, Examine"
           analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
           indexSet="ProductsIndexSet"/>
    
    </providers>
    

    My custom Examine IndexSet:

    <IndexSet SetName="ProductsIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/{machinename}/ProductsIndexSet">
    
    <IndexUserFields>
      <add Name="Id" />
      <add Name="Sku" />
      <add Name="Name" />
    </IndexUserFields>
    
    </IndexSet>    
    

    Thank you very much for your help!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies