What happens internally if I recreate an existing index?

17 views
Skip to first unread message

Richard Habermann

unread,
May 19, 2015, 7:13:39 AM5/19/15
to ne...@googlegroups.com
Hey,

as I was about to create a script which should keep my indexed properties up to date. Because we run several servers in our company for develop, staging and live we might need to rerun the script if we don't want to check the existing :schema and calculate the differences. Now the question came up if this has any implications if I call a CREATE INDEX ON ... if that index already exists exactly like that or if the procedures that will follow would just be skipped!? I guess when I initially create that index Neo4J will go over all my Data that uses the given label and write the index. If I could, I would like to skip that if I have to run the script again. Hope that makes sense.

Thank you.

Michael Hunger

unread,
May 19, 2015, 7:15:13 AM5/19/15
to ne...@googlegroups.com
It's an idempotent operation. If the index already exists, nothing will happen.

Neo4j indexes your data in the background, you see the index state when you run the :schema
command in the browser.

Michael

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Habermann

unread,
May 19, 2015, 8:28:19 AM5/19/15
to ne...@googlegroups.com
Great, thats all I wanted to hear :). Thank you.
Reply all
Reply to author
Forward
0 new messages