Guide
Every traversal starts from a source. Choose the narrowest source that matches the
data you already know.
Source choices
Source predicates are eligible for index push-down. Secondary indexes are defined per
label, so a source must be scoped to a label to read one:
nWithLabelWhere /
n_with_label_where, or a .where(...) directly after nWithLabel. A source predicate
without a label scans every node. A .where(...) later in a traversal filters the
current stream.
Read active users
Read by indexed property
Scope the source predicate to the indexed label, so the property read uses its index:Read an earlier result
UseNodeRef.var("user") (or the equivalent SDK reference) as the source of a later
entry. Named references are transaction-local; they do not create stored variables or
routes.
Next steps
Traverse relationships
Follow outgoing and incoming edges.
Filter and order
Narrow and page the current stream.