Copied to clipboard

Flag this post as spam?

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


  • James Collins 13 posts 34 karma points
    Aug 07, 2018 @ 19:58
    James Collins
    0

    Examine Grouped Range

    How would I go about implementing the following Lucene query using Examine?

    +(startDate0:[20180807150617658 TO 20190407145017100] startDate1:[20180807150617658 TO 20190407145017100])

    The query returns records where startDate0 OR startDate1 contain a value within the range. This is working properly in the backoffice when I use the Search Tool in the developer section.

    Unfortunately, I'm having trouble trying to generate this query in code using Examine. It appears as though there are no grouping methods for Range. The grouping methods I do see (GroupedOr, GroupedAnd, etc.) only apply to field/value text searching.

    Thanks!

  • James Collins 13 posts 34 karma points
    Aug 08, 2018 @ 13:45
    James Collins
    0

    Update, I was able to get around this by manually building out the raw Lucene query as a string, and then passing it into the .RawQuery method on my SearchCriteria...

    Perhaps not ideal, but it works. Let me know if anyone has any other suggestions, perhaps based on Examine.

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft