lOlive
lOlive

Reputation: 233

Launching a CREATE INDEX ON when the index already exists, in Neo4J

What happens if you replay a CREATE INDEX ON command on a Neo4J database that already has this index. Does Neo4J simply ignore that command?

Upvotes: 0

Views: 570

Answers (2)

logisima
logisima

Reputation: 7478

The first time you will execute it, Neo4j will :

  • Create the index
  • Create a background job to populate it
  • As a query stat, tell you that an index is created

At the second attempt, you will have :

  • No error
  • No impact on the existed index
  • An empty stat for the query (ie. no new index created)

Cheers

Upvotes: 1

dana c
dana c

Reputation: 1

the 2nd invocation of the create index will run, produce no error, but also not report the index alredy exists and in the end you will still only have 1 index

Upvotes: 0

Related Questions