Get Schema Index for Label / Property #36

Closed
dcinzona opened this Issue Feb 26, 2014 · 2 comments

Comments

Projects
None yet
2 participants

Does the method CheckIndexExists support checking the schema index? I'm using Neo4j 2.0 and would like to create secondary indexes but want to check if the index exists before sending the CREATE command. The same question applies to unique constraints.

Member

tathamoddie commented Feb 26, 2014

That method is from the legacy index support, not the schema based ones.

It looks like we'd need to add support for calling this API: http://docs.neo4j.org/chunked/stable/rest-api-schema-indexes.html#rest-api-list-indexes-for-a-label

yeah, that would be good. right now, there's no fallback when you call the method to create an index. Part of the new CreateIndex method should perform a check to see if that index already exists on that property.
I'm getting around it by doing a Cypher CREATE statement, but that's not really optimal.

dcinzona closed this Jul 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment