0 Replies Latest reply on Jun 21, 2013 1:45 PM by Olie

    Negation in EQL not working

    Olie

      Total records are about 12000, property P_COLOR defined for 4000 of them.

      The query

      collection()/record[P_COLOR="red"]

      returns expected result, i.e. all records, where property equals "red".

      However, when I try to fetch records by property existence, it returns 0.

      For example

      collection()/record[P_COLOR]

      OR

      collection()/record[not (P_COLOR)]

      return ZERO.

       

      I found in official docs that such syntax is supported by Endeca:

      Using negation on properties

      EQL supports filtering by the absence of assignments on records. By using the not operator, you can

      filter down to the set of records which do not have a specific property assignment.

      For example:

      collection()/record[author_id]

      returns all records with the "author_id" property, while:

      collection()/record[not (author_id)]

      returns all records without the "author_id" property.

       

      Guys, what's the catch?

      Would be very grateful for your replies.