Copied to clipboard

Flag this post as spam?

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


  • Sjors Pals 617 posts 270 karma points
    Jun 24, 2010 @ 13:19
    Sjors Pals
    0

    Examine search, problem with OR

    Hi i got the examine search working, really impressive, but i have following problem:

    When i use a OR it never hits on the second part

    float y = 0.1f;
    var query = sc.Field("Postcode", searchtext.Text.Fuzzy(y)).Or().Field("Adres", searchtext.Text.Fuzzy(y));

    Can someone explain me what i am doing wrong?

     

  • Sjors Pals 617 posts 270 karma points
    Jun 24, 2010 @ 14:19
    Sjors Pals
    1

    Just found out that i had to set the BooleanOperation to Or

     var sc = ExamineManager.Instance.CreateSearchCriteria(IndexType.Content,Examine.SearchCriteria.BooleanOperation.Or);

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 24, 2010 @ 16:16
    Aaron Powell
    1

    Correct, you need to specify that the default operation is a Boolean of Or (Default is And).

    You can view the Lucene query by doing a ToString on your ISearchCriteria object

Please Sign in or register to post replies

Write your reply to:

Draft