Peter Sie
Peter Sie

Reputation: 175

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!

Upvotes: 1

Views: 525

Answers (2)

Mouad Tribak
Mouad Tribak

Reputation: 11

Neo4j’s schema indexes are used automatically by Cypher when set up in your database. Spring Data Neo4j (version 4) does not provide facilities for handling that setup out of the box.

its clearly mentioned in official docs,

Upvotes: 1

Luanne
Luanne

Reputation: 19373

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.

Upvotes: 2

Related Questions