is_filterable: true in the namespace schema can be used in filters.
Basic filters
A filter is a JSON object where keys are attribute names and values are the match conditions.Operators
Comparison
| Operator | Description | Example |
|---|---|---|
$eq | Equal to | {"status": {"$eq": "open"}} |
$neq | Not equal to | {"status": {"$neq": "closed"}} |
$gt | Greater than | {"priority": {"$gt": 3}} |
$gte | Greater than or equal to | {"priority": {"$gte": 3}} |
$lt | Less than | {"priority": {"$lt": 5}} |
$lte | Less than or equal to | {"priority": {"$lte": 5}} |
Set membership
| Operator | Description | Example |
|---|---|---|
$in | Value is in the list | {"status": {"$in": ["open", "pending"]}} |
$not_in | Value is not in the list | {"status": {"$not_in": ["closed", "archived"]}} |
Contains
| Operator | Description | Example |
|---|---|---|
$contains | Array attribute contains the value | {"tags": {"$contains": "bug"}} |
$contains_any | Array attribute contains any of the values | {"tags": {"$contains_any": ["bug", "critical"]}} |
Logical operators
Combine multiple conditions with$and and $or.
$and
All conditions must match:
$or
At least one condition must match:
Nesting
Logical operators can be nested:Filter values
Filter values can be:| Type | Example |
|---|---|
| String | "open" |
| Number | 42, 3.14 |
| Boolean | true, false |
| Null | null |