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
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
if that doesn't work you can try to create a class derived from MultiIndexSearcher in the UmbracoExamone solution, similar to the UmbracoExamineSearcher class
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
Hi
Sorry , would really appreciate some feedback on this
Regards
Alex
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...
if that doesn't work you can try to create a class derived from MultiIndexSearcher in the UmbracoExamone solution, similar to the UmbracoExamineSearcher class
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?
is working on a reply...