Copied to clipboard

Flag this post as spam?

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


  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 24, 2012 @ 18:58
    Fuji Kusaka
    0

    Matching case with Examine

    Hi everyone,

    I have some issues working with Examine right now and not most of the threat are not solved ones. Anyways hope that one will be.

    After switching from XSLTSearch to Examine i notice am not getting the right output. For example if i search for the word "Pizza" it returns some values but in the case of lower case "pizza" it returns "0".

    Is there a way of solving this ?

    I did try using ToLower()  or ToLowerInvariant() but nothing works. Is there a way of matching the cases?

    var searcher = ExamineManager.Instance.SearchProviderCollection["Searcher"];
        var searchCriteria = searcher.CreateSearchCriteria(BooleanOperation.Or);

        var query = searchCriteria.GroupedOr(new string[] { "nodeName", "bodyText", "metaFileDescription", "metaTitle", "metaDescription" }, searchTerm).Compile();
     
        var searchResults = searcher.Search(query);
        var noResults = searchResults.Count();

     

    //fuji

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 25, 2012 @ 08:30
    Fuji Kusaka
    0

    I someone got it working  using Fuzzy()

    @using Examine.LuceneEngine.SearchCriteria
    var query = searchCriteria.GroupedOr(new string[] { "nodeName", "bodyText", "metaFileDescription", "metaTitle", "metaDescription" }, searchTerm.Fuzzy(0.5f)).Compile();
  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Sep 25, 2012 @ 10:08
    Ismail Mayat
    0

    Fuji,

    What analyzer are you using for indexing / searching? Check your config files by default everything thing should be in index lowercase so searches should be case insensitive.

    Regards


    Ismail

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 25, 2012 @ 11:19
    Fuji Kusaka
    0

    Hi Ismail,

    What should i look for in umbracoSettings.config ?

     

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Sep 25, 2012 @ 13:11
    Ismail Mayat
    0

    Not umbracoSettings but the  ExamineSettings.config the index provider being used for the search what is the analyzer set to ? In fact if you just paste the contents of that file here and let me know which searcher you are using.

    Regards

     

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft