If you created some constraint ( CREATE CONSTRAINT
) or index ( CREATE INDEX
on nodes or relationship or a fulltext index via db.index.fulltext.createNodeIndex
or db.index.fulltext.createRelationshipIndex
) and subsequently receive an error stating the index or constraint is missing when making a Cypher query or any API call that would rely on that same index / constraint please check the following:
- Check the index or constraint was successfully created with
CALL db.index()
- Review the log file query.log for any index or constraint drop (drop index, drop constraint)
- Review your queries and check any calls to
CALL apoc.schema.assert(...)
.
The default behaviour is that when callingapoc.schema.assert({indexLabel:[indexKeys],…},{constraintLabel:[constraintKeys],…}, dropExisting : true) yield label, key, unique, action
the last parameter dropExisting is by default true and therefore the schema is replaced.
See http://neo4j-contrib.github.io/neo4j-apoc-procedures/3.5/indexes/schema-index-operations/ - Check that no database dump or database export has been loaded that would overwrite the existing "schema". This can be found in the `neo4j.log` file.
- Finally, if all the above fail, try to regularly poll on
CALL db.index()
and log the output to a debug file in order to narrow down the time interval of the issue and review the queries or events.
For further help, please reach out to the technical support.
Comments
0 comments
Article is closed for comments.