Copied to clipboard

Flag this post as spam?

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


  • James Telfer 65 posts 165 karma points
    Jan 10, 2011 @ 07:05
    James Telfer
    0

    Examine returns media results when none exist in searched index

    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"/>

    and:

          <add name="WebsiteIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
               runAsync="true"
               supportUnpublished="false"
               supportProtected="false"
               interval="10"
               analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>

     

     

  • Aaron Powell 1708 posts 3043 karma points c-trib
    Jan 10, 2011 @ 12:25
    Aaron Powell
    0

    You're not compiling your query before invoking it, if you don't compile it it'll not be properly setup

  • James Telfer 65 posts 165 karma points
    Jan 10, 2011 @ 12:30
    James Telfer
    0

    Ahh - RTFM :)

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft