cancel
Showing results for 
Search instead for 
Did you mean: 

Putting full-text indexes on properties

shayantest2
Node Clone

How should I put full-text indexes on properties using Spring Data Neo4j?

4 REPLIES 4

You would have to manually (admin operation) add those indexes.

E.g. as a database init/migration script.

To use the fulltext indexes you'd need to use a custom @Query annotation on your repository or use Neo4jSession.

Why is that? When we can add indexes simply using @Index, why should putting a full-text index be that hard?

Because it's a different kind of index, which can be non-transactional, it's more like a lightly integrated FTS engine.

It's the way it is currently designed/implemented in the database, so that's the way it is.

gerrit_meier
Neo4j
Neo4j

As @michael.hunger said: They are a different kind of queries that would have to create. Additionally this functionality does not exists in older OGM-supported versions of Neo4j.
It would be too much complexity in the source code for introducing a feature that should IMHO, just like the other index creations, only be used during development phase.