indexing - Index for all vertices in Neo4j -


i need create unique index across vertex, irrespective of label, in neo4j.

i can following, not guarantee global uniqueness:

create constraint on (x:mytype1) assert x.identifier unique

the above allow (x:mytype1) , (y:mytype2) have same identifier.

is there way implement globally unique uniqueness constraint?

there might better ways, seem have found one: using label.

create (v:label1:global {identifier:"12345")

and have global uniqueness constraint set against global label:

create constraint on (g:global) assert g.identifier unique


Comments