This discussion is archived
3 Replies Latest reply: May 29, 2013 1:05 PM by 952794 RSS

Endeca EQL/Range Filters "OR" possible?

968624 Newbie
Currently Being Moderated
Hi Guys,

Here is the requirement -

(property1 > 100 and property2 < 200) or (property3 >100 and property4 <200)

Now I understand that Nf ie range filters can have "And"operation by adding "|" between the conditions but can we have ORing as well?

If not, can we use Nrs for this.
I tried below examples but it didnt work -

collection()/record[[property1  >100  and property2 < 200 ]OR[property3 >100 and property4  <200]]


A sample syntax would be helpful.

Thanks!
  • 1. Re: Endeca EQL/Range Filters "OR" possible?
    rkalempudi Newbie
    Currently Being Moderated
    Hi,
    Did you find any solutions for this?. Even we are facing the similar kind of issue.

    Please help us if you find any solutions.
    My requirement is to apply the (property1 < =0 OR property1 < X) AND (property2 <=0 OR property2 > X).

    Thanks,
    Ravi K.
  • 2. Re: Endeca EQL/Range Filters "OR" possible?
    968624 Newbie
    Currently Being Moderated
    Hi Ravi,

    I didnt find a solution to my problem :(

    But if your problem is precisely what you have written then why dont you try this -

    Requirement : (property1 < =0 OR property1 < X) AND (property2 <=0 OR property2 > X)

    Compare 0 and X

    If X is higher then query as -

    (property1 < X and property2 > X)


    If 0 is higher then query as -

    (property1 <= 0 and property2 <= 0)

    If both are equal -

    (property1 <= 0 and property2 <= 0)


    Cheers,
    Mohit
  • 3. Re: Endeca EQL/Range Filters "OR" possible?
    952794 Newbie
    Currently Being Moderated
    Hi Ravi,

    I had the same issue and was able to resolve it. below is the snippet for your code. Hope this helps

    Nrs=collection()/record[<your_record_spec_Property>=collection()/record[property1>0+and+property1<X+or+property2>0+and+property2<1]/<your_record_spec_Property>]

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points