Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I've been using Examine in a couple of projects, and I've just come upon an issue where I appear to receive results from a different index. I'm hoping this is a simple SNAFU on my part.
var searcher = ExamineManager.Instance.SearchProviderCollection["WebsiteSearcher"];
var criteria = searcher.CreateSearchCriteria(IndexTypes.Content);
criteria.GroupedOr(searchFields, terms.ToLower()); /* searchFields is a string array */
var results = searcher.Search(criteria);
The results include media items, though I haven't referenced the Internal index. Looking at the Website index with Luke, no items with an "___IndexType" of "media" are present.
Is there something very obvious that I'm doing wrong? I'm using the v1 release of Examine.
The config is:
<add name="WebsiteSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine" analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
<add name="WebsiteIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine" runAsync="true" supportUnpublished="false" supportProtected="false" interval="10" analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
You're not compiling your query before invoking it, if you don't compile it it'll not be properly setup
Ahh - RTFM :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted