Guide
Secondary indexes narrow node or edge sources by property. Index creation is
asynchronous and includes existing data through a durable backfill.
Index families
Definitions include the entity kind, label, property, and range direction where
applicable.
Create an equality index
operation_id before depending on indexed
performance.
Track an index operation
status is queued, running, blocked, succeeded, or aborted. A blocked
operation carries a blocker_code and does not resume on its own. Fix the cause, then
run retry_index_operation (retryIndexOperation) as a write with the same
operation_id, or abort_index_operation (abortIndexOperation) to discard the build.
While the build is in flight, repeating the same CREATE returns existing_operation
with the same operation_id instead of starting another build. Once the index is
active, it returns already_active without an operation_id. After an abort finishes,
it starts a new build with a new operation_id.
Query indexed data
UsenWithLabelWhere("User", SourcePredicate.eq("status", "active")) (or the
language-equivalent snake_case builder) for index push-down, then project the required
fields. The read must be scoped to the index’s label: a source predicate without a label
scans every node. A .where(...) directly after nWithLabel("User") is pushed down to
the index too; later in a traversal it filters a possibly larger intermediate stream.
Cypher statements use these indexes automatically, without naming them. An
equality or IN match on a labeled node reads an equality index, and range
comparisons and ordered LIMIT reads use a range index:
Unique indexes
A unique equality backfill becomes blocked if existing data contains duplicates. Fix the source data, then retry the same operation instead of creating a new definition.Next steps
Troubleshoot index operations
Resolve blocked builds and lifecycle errors.
Filtering
Match predicates to source and post-traversal filters.