Skip to main content
@moss-dev/moss / MetadataFilter

Type Alias: MetadataFilter

Composable metadata filter passed to QueryOptions.filter. Metadata filtering narrows query results to only documents whose metadata satisfies the filter. It is evaluated on the loaded (local) index; load the index via loadIndex() before querying.

Shapes

  • Field condition - compare a single metadata field using a FilterCondition operator.
  • $and - logical AND of nested filters; a document must satisfy every entry.
  • $or - logical OR of nested filters; a document must satisfy at least one entry.

Example