Copied to clipboard

Flag this post as spam?

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


  • Alex 10 posts 30 karma points
    May 14, 2011 @ 08:38
    Alex
    0

    Implementing Multi Index Search in 4.7.0

    Hi

    I have implemented the standard umbraco examine search for 4.6  by following the online tutorial however i noticed that 4.7.0 has introduced a multi index searcher which i can see the examine code. 

    Where i am stuck is trying to use this searcher (pretty sure im missing something obvious!)

    I tried changing my examinesettings config as follows

     <add name="ContentSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
                 analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" enableLeadingWildcards="true"  indexSets="ContentIndexSet,PDFIndexSet"/>

    and  do the search with

        var criteria = ExamineManager.Instance.SearchProviderCollection["ContentSearcher"].CreateSearchCriteria();
                     
                        var filter = criteria.GroupedOr(new string[] { "nodeName", "title", "bodyText", "FileTextContent" }, key)
                                             
                                              .Compile();

       ISearchResults  rslts = ExamineManager.Instance.SearchProviderCollection["ContentSearcher"].Search(filter);

    It doesnt fail to run but i only seem to be getting the ContentIndexSet results  - from abit of poking around i think its calling the LuceneSearcher not MultiIndexSearcher in the examine code

    Where am i going wrong?

     

    Thanks in advance for the help

     

    Alex

  • Alex 10 posts 30 karma points
    May 17, 2011 @ 08:49
    Alex
    0

    Hi

     

    Sorry , would really appreciate some feedback on this

     

    Regards

    Alex

  • Dana Visescu 3 posts 24 karma points
    May 18, 2011 @ 08:23
    Dana Visescu
    1

    Hey Alex,

    try

    <add name="ContentSearcher" type="Examine.LuceneEngine.Providers.MultiIndexSearcher, MultiIndexSearcher"
                 analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" enableLeadingWildcards="true"  indexSets="ContentIndexSet,PDFIndexSet"/>

    BTW, searching for the title of your post in our.umbraco.org  doesn't return any results...

  • Dana Visescu 3 posts 24 karma points
    May 19, 2011 @ 01:25
    Dana Visescu
    0

    if that doesn't work you can try to create a class derived from MultiIndexSearcher in the UmbracoExamone solution, similar to the UmbracoExamineSearcher class

  • Tajamal 87 posts 175 karma points
    Jan 14, 2016 @ 08:58
    Tajamal
    0

    Please, can you be clear on what to add to ExamineSettings.config and ExamineIndex.config files.

    You could also just combine to results in a list and return the result, have not tried but I think it will work?

Please Sign in or register to post replies

Write your reply to:

Draft