Search code examples
indexingconstraintsspring-data-neo4jspring-data-neo4j-4

Constraint and Index Declaration in Spring Data Neo4j 4.0.0


I just want to clarify of what I read in the Spring Data Neo4j 4.0.0 documentation. So, the provided way to configure index & unique constraint is just by defining it directly in the web console using Cypher query, and no more inside the application (like what @indexing tag does previously). Is it correct?

Thank you in advance and your response would be really appreciated!


Solution

  • That's right. Index maintenance and configuration is not the responsibility of the OGM or Spring Data. It can be configured as you said via the shell, or you can use the Session/Neo4jTemplate.execute with your Cypher statement.