openCypher icon indicating copy to clipboard operation
openCypher copied to clipboard

Add Neo4j index extension CIP

Open Mats-SX opened this issue 7 years ago • 4 comments

This reflects a Neo4j extension of the constraints syntax suggested in #166 to support index creation/deletion.

Direct link to CIP

Mats-SX avatar Mar 03 '17 16:03 Mats-SX

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.

Mats-SX avatar Jul 26 '19 14:07 Mats-SX

I have some questions:

  • Having node-pattern in the grammar, would that not allow writing CREATE 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.

sherfert avatar Jul 30 '19 13:07 sherfert

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

Mats-SX avatar Aug 30 '19 12:08 Mats-SX

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

Mats-SX avatar Aug 30 '19 13:08 Mats-SX