Copied to clipboard

Flag this post as spam?

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


  • mark firth 32 posts 75 karma points
    Mar 08, 2012 @ 16:04
    mark firth
    0

    Examine strips "IT" Noise word in a query

    Im trying to query a with standard analyser using the bleow code (shortened)

    var sc = ExamineManager.Instance.CreateSearchCriteria();
    var query = sc.NodeTypeAlias("Job");

    if (!string.IsNullOrEmpty(sector))
    {
        query.And().Field("jobIndustry", sector);
    }

    var results = Examine.ExamineManager.Instance.SearchProviderCollection["JobSearcher"].Search(query.Compile());

    which gives when ToString() is called:

    { SearchIndexType: , LuceneQuery: +__NodeTypeAlias:job +jobIndustry:IT }

    All as expected but it returns no results when i know it should.

    I tried the raw query in Luke and it looks like the "+jobIndustry:IT" gets dropped. I expect the reason is "IT" is considered a noise word, but in this case it is not. Does anybody know how to fix this by maybe altering the dictionary of noise words where "IT" is allowed. Where would i find the file that is loaded? Any ideas would be appreciated.

    PS. I cannot change the word IT as it comes from  a third party feed.

    Cheers,

    Mark

     

  • mark firth 32 posts 75 karma points
    Mar 10, 2012 @ 14:04
    mark firth
    0

    I'll answer my own question with the help of this post:

    http://our.umbraco.org/forum/developers/extending-umbraco/19465-Common-words-in-examine

    The answer is to use the Whitespace Analyzer.

  • 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