Skip to main content
Filters scope a search to rows that match conditions on your metadata fields (plus id and text). A filter is either a single condition or a logical combination of conditions, and the whole structure is typed against your metadata.

Conditions

A single condition names a field, an operator op, and (for most operators) a value. The field is one of your metadata keys, or id / text; names resolve to the underlying columns automatically.

Operators

The IS … operators take no value.

Combining conditions

Wrap conditions in AND, OR, or NOT to build compound filters. These nest freely, so you can express any boolean logic.

AND / OR

NOT

NOT negates a single nested filter (which may itself be a condition or a group).

Nesting

Types

Because filters are typed against T["metadata"], an unknown field name or a value of the wrong type is a compile-time error.
Filters compile to SQL predicates over the metadata.<field> columns. For fields you filter on frequently, add a scalar index with createIndex() so the engine can skip non-matching rows instead of scanning them.