Guide
HelixDB filters in two places:
- A source predicate such as
nWhere/n_whereselects the initial candidates. It is eligible for index push-down, so filter here whenever you can. .where(...)filters the current stream at any later point in a traversal, for example after following an edge.
Common predicates
Values can be literals or typed parameter expressions.
Filter a stream
Filter search candidates
To restrict vector or full-text search to a candidate set, build the traversal that decides membership and search within it. Do not filter search results afterward with.where(...): excluded high-ranking hits still consume the top k. See
Prefiltered search.
Vector prefiltering
See Vector prefiltering.Full-text search prefiltering
See Full-text search prefiltering.Next steps
Typed parameters
Move request-specific filter values out of the AST.
Secondary indexes
Back equality and range predicates with an index.
Prefiltered search
Rank only the records a traversal reaches.