CREATE INDEX
Generic Description
Create a named property index.
Simple example:
CREATE INDEX idx_person_name FOR (p:Person) ON (p.name)
Consumer-Level Explanation
Use CREATE INDEX when the query must create a named property index and the planner needs to see that operation as part of the Cypher row pipeline. Keep the clause explicit because it controls row grain, variable scope, and what later clauses are allowed to reference.
More Detailed Explanation
CREATE INDEX is how you tell Nexyron that a property access pattern matters enough to merit an acceleration structure. In practice this is less about syntax trivia and more about declaring what dimensions of the graph are important for lookup and filtering.
What this clause is really for:
- it defines one concrete stage in the Cypher row pipeline, so variables available before and after
CREATE INDEXmust be clear - it should make graph structure, temporal filters, document payload shaping, or procedure output explicit instead of relying on client-side interpretation
- planner tooling depends on this clause boundary to know row grain, variable scope, and whether later expressions are reads, writes, schema operations, or projections
Advanced Example
This example keeps CREATE INDEX inside a complete query pipeline so the clause boundary, visible variables, and returned row shape are clear to planner tooling.
SHOW INDEXES
Real Use Cases
- accelerating high-selectivity identity lookups
- making common filter predicates cheaper
- preparing operational entities for API-style access paths
Real Limitations And Tradeoffs
- wrong indexes consume resources without helping real plans
- indexing strategy should follow observed query patterns
- text and vector needs are different from plain property indexes