apoc.schema.node.indexExists
Function APOC Core
RETURN apoc.schema.node.indexExists(labelName, propertyNames)
Signature
apoc.schema.node.indexExists(labelName :: STRING?, propertyName :: LIST? OF STRING?) :: (BOOLEAN?)
Usage Examples
The examples in this section are based on a database that has applied the following constraints:
CREATE CONSTRAINT personName ON (person:Person)
ASSERT person.name IS UNIQUE;
CREATE CONSTRAINT userId ON (user:User)
ASSERT user.id IS UNIQUE;
CREATE INDEX personCity FOR (person:Person)
ON (person.city);
RETURN apoc.schema.node.indexExists("Person", ["name"]) AS output;
output |
---|
TRUE |
RETURN apoc.schema.node.indexExists("Person", ["city"]) AS output;
output |
---|
TRUE |