openCypher
openCypher copied to clipboard
Add Neo4j index extension CIP
This reflects a Neo4j extension of the constraints syntax suggested in #166 to support index creation/deletion.
This CIP is now also ready for review. It builds on top of #166 so there's no need to review changes that come from that PR here. The reason to build it on top is because this CIP makes many references to the general Constraint Syntax CIP.
I have some questions:
-
Having
node-pattern
in the grammar, would that not allow writingCREATE INDEX foo FOR (a:Foo:Bar) ON a.prop
? I.e. I think we cannot allow multiple labels or no labels, or if we do, we should explain that neo4j does not currently support that and what the semantics are. -
I know that neo4j does not store null-properties in indexes, but is there a fundamental reason why we would want to enforce that? I know we have been discussing null-indexes for index-backed-order-by, so I think it can be a valuable thing that we do not want to forbid.
-
Is there a recommendation on how systems should generate unique names for constraints/indexes? I think that would be valuable.
CLG review finds on @sherfert's points:
- We'll go with general syntax for patterns and implementation limitations
- Explicitly forbidding
null
values will be removed from this CIP - No recommendation is required
From LangStar review:
- Extend with
OPTIONS
syntax to specify particular index details (such as implementation type) - Allow not only node patterns, but a general pattern including relationships
- Require property expressions to be delimited using parentheses