ElasticGraph Query API: Available Filter Predicates

ElasticGraph offers a variety of filtering predicates:

allOf
Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL.

Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can’t be provided on a single filter input because of collisions between key names. For example, if you want to provide multiple anySatisfy: ... filters, you could do allOf: [{anySatisfy: ...}, {anySatisfy: ...}].

When null or an empty list is passed, matches all documents.

anyOf
Matches records where any of the provided sub-filters evaluate to true. This works just like an OR operator in SQL.

When null is passed, matches all documents. When an empty list is passed, this part of the filter matches no documents.

anySatisfy
Matches records where any of the list elements match the provided sub-filter.

When null or an empty object is passed, matches all documents.

count
Used to filter on the number of non-null elements in this list field.

When null or an empty object is passed, matches all documents.

equalToAnyOf
Matches records where the field value is equal to any of the provided values. This works just like an IN operator in SQL.

When null is passed, matches all documents. When an empty list is passed, this part of the filter matches no documents. When null is passed in the list, this part of the filter matches records where the field value is null.

gt
Matches records where the field value is greater than (>) the provided value.

When null is passed, matches all documents.

gte
Matches records where the field value is greater than or equal to (>=) the provided value.

When null is passed, matches all documents.

lt
Matches records where the field value is less than (<) the provided value.

When null is passed, matches all documents.

lte
Matches records where the field value is less than or equal to (<=) the provided value.

When null is passed, matches all documents.

matchesPhrase
Matches records where the field value has a phrase matching the provided phrase using full text search. This is stricter than matchesQuery: all terms must match and be in the same order as the provided phrase.

When null is passed, matches all documents.

matchesQuery
Matches records where the field value matches the provided query using full text search. This is more lenient than matchesPhrase: the order of terms is ignored, and, by default, only one search term is required to be in the field value.

When null is passed, matches all documents.

near
Matches records where the field’s geographic location is within a specified distance from the location identified by latitude and longitude.

When null or an empty object is passed, matches all documents.

not
Matches records where the provided sub-filter evaluates to false. This works just like a NOT operator in SQL.

When null or an empty object is passed, matches no documents.

timeOfDay
Matches records based on the time-of-day of the DateTime values.

When null or an empty object is passed, matches no documents.