Filtering
Filters can be applied on any navigation. The syntax used for filtering is a sub-set of Filtrera.
Below is a list of operators and keywords supported by the query engine.
| Operator | Description |
|---|---|
== | Equal |
!= | Not equals |
< | Less than |
<= | Less than or equal |
> | Greater than |
>= | Greater than or equal |
and | Logical “and”, matches if both operands are true |
or | Logical “or”, matches if any operand is true |
not <expression> | Inverse a boolean expression |
anyof [<value>, <value>] | Matches arrays that contain any of the provided value |
allof [<value>, <value>] | Matches arrays that contain all of the provided value |
Array Filtering Examples
Use anyof to match nodes that have any of the specified values:
tags anyof ['urgent', 'high-priority']Use allof to match nodes that have all of the specified values:
tags allof ['completed', 'verified']Combining Array and Value Filters
Array filters can be combined with other conditions:
tags anyof ['fraud-suspected'] and createdAt >= now - 1 daysnow keyword
now can be used to reference the current time. This can be combined with basic arithmetic and durations to query for relative ranges.
To filter for nodes created the last 7 days (assuming the node has a createdAt field):
createdAt > now - 7 days