Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 952 karma points
    Sep 21, 2011 @ 00:54
    Tom
    0

    Examine OR Search

    Hi Guys,

    I've been trying to perform a search with examine using OR based criteria.. I have found if i search for 2 words or more it is trying to search for an exact match.. how would i make it perform an or based search?

    Thanks,

    Tom

  • Rich Green 2246 posts 4006 karma points
    Sep 21, 2011 @ 08:27
    Rich Green
    2

    Hey Tom,

    Not 100% sure it has the exact answer you need, but just in case you haven't seen it there was a pretty extensive and up to date Blog post about Examine here

    http://umbraco.com/follow-us/blog-archive/2011/9/16/examining-examine.aspx

    Best of luck

    Rich

  • Sune Jepsen 25 posts 109 karma points
    Sep 21, 2011 @ 12:04
  • Tom 713 posts 952 karma points
    Sep 22, 2011 @ 01:56
    Tom
    0

    Both answers were super helpful!

    thanks so much guys!

  • Matt Taylor 859 posts 2052 karma points
    Jun 26, 2013 @ 17:24
    Matt Taylor
    0

    I need to something like this:

    and field1 = "0" or (field1 = "1" and field2 = "show")

    but i'm really struggling to see how to do it.

    I'm pretty sure this is not going to give me the results I want:

    .And().Field("field1", "0").Or().Field("field", "1").And().Field("field2", "show"));

    How do I prioritse the boolean operators?

    Thanks, Matt

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jul 01, 2013 @ 16:03
    Ismail Mayat
    0

    Matt,

    Think for the second bit a grouped .And().Field("field1", "0").Or().GroupedAnd(arrOffields,arrayOfValues);

    however i would write out the generated query then try and run it in luke (https://code.google.com/p/luke/) or examine inspector (http://our.umbraco.org/projects/backoffice-extensions/examine-inspector) see what you get

    Regards

     

    Ismial

  • 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