Skip to main content
Attach metadata to documents at index time, then constrain queries to the documents whose metadata matches a filter. Filtering is evaluated on the locally loaded index, so call loadIndex() (or open a session) before querying with a filter. The filter is passed as QueryOptions.filter.

Operators

A single condition compares one metadata field with a FilterCondition operator. Compose multiple conditions with $and / $or (nestable). A single condition can be passed on its own without a wrapper. See MetadataFilter for the full filter shape.

Examples

Filtering inside a session

The same filter syntax works on a session query, evaluated entirely in-memory.