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:

Both filters are used in the state of the query. The filter language for both filters is basically the record-filtering WHERE clause expression from EQL.

More details on the filter syntax and available EQL operators are provided in later topics.

DataSourceFilter

The DataSourceFilter 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. The DataSourceFilter supports queries against collections (as specified in the state).

Because DataSourceFilter 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 DataSourceFilter filter.

Note while processing a query, Endeca Server automatically adds a DataSourceFilter to any state that contains a collection name. For more information, see Automatic addition of data source filter.

SelectionFilter

After the universe of records has been narrowed by DataSourceFilter, the SelectionFilter 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.

The SelectionFilter supports queries against collections (as specified in the state). Any filter rules associated with those collections are automatically invoked in the query. If an implicit filter is generated by a request, the resulting information about that implicit filter is returned in the AppliedFilterRule element.

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

Using multiple EQL filters in a query

A state can have multiple DataSourceFilter and/or SelectionFilter filters. In this case, each filter must have a unique name within the state.

If two or more filters are specified (for example, two SelectionFilter elements), the returned record set represents an intersection of the multiple searches. For example, if one SelectionFilter filter is searching for Color=red and the other SelectionFilter filter is searching for Color=blue, then each record in the resulting record set will have both "red "and "blue" assignments (rather than having a union of all "red" records and all "blue" records).

Dgraph enablement

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