About EQL record filters

EQL record filters let you define arbitrary subsets of the total record set, and dynamically restrict search and navigation results to these subsets.

The Conversation Web Service has two filtering components that allow you to use the Endeca Query Language (EQL) to provide filters for your query using EQL syntax:
The filter language for both components is basically the record-filtering WHERE clause expression from EQL. Both filters are used in the State element of the query, as in this abbreviated example:
<Request>
  <State>
    <DataSourceFilterString>PROD_CATEGORY = 'Hardware'</DataSourceFilterString>
    <SelectionFilterString>AMOUNT_SOLD > 1000</SelectionFilterString>
  </State>
...
</Request>

More details on the available EQL operators and functions are listed in a later topic.

DataSourceFilterString

The DataSourceFilterString component filters the corpus of records before any other processing is done. In other words, this filter is applied first, and makes the universe of data that is visible to your query smaller. This means that filtered-out records will not contribute to spell correction, and will not be available as part of AllBaseRecords in EQL.

Because DataSourceFilterString restricts the searchable records to a specified subset of the total records in the Dgraph, it can be used as a security filter to prevent users from obtaining records that they are not authorized to view. In EQL terms, AllBaseRecords corresponds to the records that pass the DataSourceFilterString filter.

SelectionFilterString

After the universe of records has been narrowed by DataSourceFilterString, the SelectionFilterString component is used for additional application-level filtering. It specifies the criteria for the final record result set. The results that are returned are the records that match all of the filters specified in the query.

SelectionFilterString also determines which data is available for refinement computation. NavStateRecords corresponds to the records that pass all filters (including SelectionFilterString).

Maximum number of EQL filters

A query can have a maximum of one DataSourceFilterString filter and one SelectionFilterString filter. If two or more such filters are specified, the query will fail with an appropriate error message:
You may not have more than one DataSourceFilter across State and Operators

You may not have more than one SelectionFilter across State and Operators

In this case, you can remove the extraneous filter(s) and rewrite the one filter with AND or OR operators to specify multiple conditions in the filter.

Dgraph enablement

No Dgraph process configuration flags are necessary to enable EQL record filters.