Record filter syntax

Record filters are specified with query-based expressions.

Record filters are specified directly within a query to the Oracle Endeca Server. The query-level syntax supports prefix-oriented Boolean functions (AND, OR, and NOT), colon-separated paths for standard attribute values, and forward-slash-separated paths for managed attribute values.

The following BNF grammar describes the syntax for query-level filter expressions:

<filter>      ::= <and-expr>
                | <or-expr>
                | <not-expr>
                | <literal>
<and-expr>    ::= AND(<filter-list>)
<or-expr>     ::= OR(<filter-list>)
<not-expr>    ::= NOT(<filter>)
<filter-list> ::= <filter> 
                | <filter>,<filter-list>
<literal>     ::= <pval> 
                | <dval-path>
<pval>        ::= <prop-key>:<prop-value>
<prop-key>    ::= <string>
<prop-value>  ::= <string>
<dval-path>   ::= <string>
                | <string>/<dval-path>
<string>      ::= any character string
The following six special reserved characters must be prepended with an escape character (\) for inclusion in a string:
( ) , : \ /

Example of a query-level filter expression

The following example illustrates a basic filter expression that uses nested Boolean operations:
OR(AND(Manufacturer:Sony, Product Category/Digital Camera),
   AND(Manufacturer:Aiwa,NOT(Product Category/Television)), Manufacturer:Denon)
This expression will match the set of records satisfying any of the following statements:
  • Value for the Manufacturer attribute is Sony and record assigned managed attribute value is Product Category/Digital Camera.
  • Value for Manufacturer is Aiwa and record is not assigned managed attribute value Product Category/Television.
  • Value for Manufacturer attribute is Denon.

Using Boolean attributes

Filtering by Boolean attribute assignments is supported. You can specify the Boolean value as true (or its synonym of 1), or as false (or its synonym of 0). For example, assuming isOdd is a Boolean attribute, both isOdd:1 and isOdd:true will parse properly and yield the same results.