If you created some constraint ( CREATE CONSTRAINT
see details here) or index ( CREATE INDEX
- see details here) on nodes or relationship ( or legacy 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
SHOW INDEXES
( see details here) - 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 further details here. - Check that no database dump or database export has been loaded that would overwrite the existing "schema".
If you tried everything above, regularly poll on SHOW INDEXES
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.
Comments
0 comments
Article is closed for comments.