Filtering
Filters over numeric, boolean, or datetime fields that are indexed as fast fields can be “pushed down” into the BM25 index using the @@@
operator. For instance, the following
two queries produce identical results, but the second query “pushes down” the rating > 2
filter into the BM25 index.
Automatically executing the first type of query as the second query is on the roadmap, but not yet supported.
Numeric Filter
The following query returns all rows matching description:shoes
where rating
equals 4
.
Comparison operators >
, >=
, <
, and <=
are supported.
Datetime Filter
RFC 3339 formatted dates wrapped in double quotes can be used to filter over datetime fields.
Boolean Filter
Boolean fields can be filtered with true
or false
.
Range Filter
The inclusive []
and exclusive {}
bounds can be used for range filtering.
Range filters can also be applied over text fields. The following query finds all documents where
description
contains a token that is lexicographically between book
and camera
(i.e. would come between
book
and camera
in a dictionary).
Set Filter
The IN
operator finds documents that match at least one element in a set.
Was this page helpful?