For the complete documentation index optimized for AI agents, see llms.txt.Secondary indexes accelerate property-based filtering on the labeled property graph. Two flavors are available, each on both nodes and edges:
- Equality indexes map
property = valueto the set of matching IDs. Use them for exact-match lookups like “all users withstatus = active.” - Range indexes provide ordered scans over numeric and string properties. Use them for
comparisons like
timestamp > Torscore >= 4.
.where_(Predicate::...), but the route will scan the label rather than seek the
index.
Indexes address top-level properties only. Nested fields (e.g. metadata.externalID) can be
filtered with a dotted path but are scan-only in V1 — store frequently indexed metadata as
top-level properties.
The DSL fragments below are bare traversals. To execute them, wrap each one in a read_batch()
or write_batch() route as shown in Querying.
Equality Index — Nodes
Declare the index as part of your schema setup write batch:n_with_label_where pushes the
predicate down to the index so the route never scans the full label:
Equality Index — Edges
Declare an equality index on an edge property:add_e is called from a node-state traversal — the
current node is the edge’s source, and the second argument is the target:
e_with_label_where:
Range Index — Nodes
Declare a range index on a numeric or string property:gt, gte, lt, lte, or between: