Skip to content

Commit

Permalink
Merge pull request #139 from ldbc/neo4jv5
Browse files Browse the repository at this point in the history
Cypher: Bump Neo4j version to v5.1
  • Loading branch information
szarnyasg authored Nov 22, 2022
2 parents bd95660 + b2f6ca2 commit f19a934
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions cypher/ddl/indices.cypher
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// uniqueness constrains (implying an index)
CREATE CONSTRAINT ON (n:City) ASSERT n.id IS UNIQUE;
CREATE CONSTRAINT ON (n:Comment) ASSERT n.id IS UNIQUE;
CREATE CONSTRAINT ON (n:Country) ASSERT n.id IS UNIQUE;
CREATE CONSTRAINT ON (n:Forum) ASSERT n.id IS UNIQUE;
CREATE CONSTRAINT ON (n:Message) ASSERT n.id IS UNIQUE;
CREATE CONSTRAINT ON (n:Organisation) ASSERT n.id IS UNIQUE;
CREATE CONSTRAINT ON (n:Person) ASSERT n.id IS UNIQUE;
CREATE CONSTRAINT ON (n:Post) ASSERT n.id IS UNIQUE;
CREATE CONSTRAINT ON (n:Tag) ASSERT n.id IS UNIQUE;
CREATE CONSTRAINT FOR (n:City) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT FOR (n:Comment) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT FOR (n:Country) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT FOR (n:Forum) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT FOR (n:Message) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT FOR (n:Organisation) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT FOR (n:Person) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT FOR (n:Post) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT FOR (n:Tag) REQUIRE n.id IS UNIQUE;

// name/firstName
CREATE INDEX ON :Country(name);
CREATE INDEX ON :Person(firstName);
CREATE INDEX ON :Tag(name);
CREATE INDEX ON :TagClass(name);
CREATE INDEX FOR (n:Country) ON n.name;
CREATE INDEX FOR (n:Person) ON n.firstName;
CREATE INDEX FOR (n:Tag) ON n.name;
CREATE INDEX FOR (n:TagClass) ON n.name;

// creationDate
CREATE INDEX ON :Message(creationDate);
CREATE INDEX ON :Post(creationDate);
CREATE INDEX ON :Forum(creationDate);
CREATE INDEX FOR (n:Message) ON n.creationDate;
CREATE INDEX FOR (n:Post) ON n.creationDate;
CREATE INDEX FOR (n:Forum) ON n.creationDate;

0 comments on commit f19a934

Please sign in to comment.