At the time of creation extra configuration can be specified to control the behavior of the index and which backend to use. For example to create a Lucene fulltext index:
IndexManager index = graphDb.index(); Index<Node> fulltextMovies = index.forNodes( "movies-fulltext", MapUtil.stringMap( IndexManager.PROVIDER, "lucene", "type", "fulltext" ) ); fulltextMovies.add( theMatrix, "title", "The Matrix" ); fulltextMovies.add( theMatrixReloaded, "title", "The Matrix Reloaded" ); // search in the fulltext index Node found = fulltextMovies.query( "title", "reloAdEd" ).getSingle();
Tip | |
---|---|
In order to search for tokenized words, the |
The configuration of the index is persisted once the index has been created.
The provider
configuration key is interpreted by Neo4j, but any other configuration is passed onto the backend index (e.g. Lucene) to interpret.
Lucene indexing configuration parameters
Parameter | Possible values | Effect |
---|---|---|
|
|
|
|
| This parameter goes together with |
| the full class name of an Analyzer | Overrides the |
Copyright © 2012 Neo Technology