public interface IndexManager
Indexs for Nodes
and Relationships. An IndexManager is paired with a
GraphDatabaseService via GraphDatabaseService.index() so that
indexes can be accessed directly from the graph database.| Modifier and Type | Field and Description |
|---|---|
static String |
PROVIDER
The configuration key to use for specifying which provider an index
will have, i.e.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
existsForNodes(String indexName)
Returns whether or not there exists a node index with the name
indexName. |
boolean |
existsForRelationships(String indexName)
Returns whether or not there exists a relationship index with the name
indexName. |
Index<Node> |
forNodes(String indexName)
|
Index<Node> |
forNodes(String indexName,
Map<String,String> customConfiguration)
|
RelationshipIndex |
forRelationships(String indexName)
|
RelationshipIndex |
forRelationships(String indexName,
Map<String,String> customConfiguration)
|
Map<String,String> |
getConfiguration(Index<? extends PropertyContainer> index)
Returns the configuration for
index. |
AutoIndexer<Node> |
getNodeAutoIndexer() |
RelationshipAutoIndexer |
getRelationshipAutoIndexer() |
String[] |
nodeIndexNames()
Returns the names of all existing
Node indexes. |
String[] |
relationshipIndexNames()
Returns the names of all existing
Relationship indexes. |
String |
removeConfiguration(Index<? extends PropertyContainer> index,
String key)
EXPERT: Removes a configuration parameter from an index.
|
String |
setConfiguration(Index<? extends PropertyContainer> index,
String key,
String value)
EXPERT: Sets a configuration parameter for an index.
|
static final String PROVIDER
boolean existsForNodes(String indexName)
indexName. Indexes are created when needed in calls to
forNodes(String) and forNodes(String, Map).indexName - the name of the index to check.indexName.Index<Node> forNodes(String indexName)
Index for Nodes with the name indexName.
If such an index doesn't exist it will be created with default configuration.
Indexes created with forNodes(String, Map) can be returned by this
method also, so that you don't have to supply and match its configuration
for consecutive accesses.
This is the prefered way of accessing indexes, whether they were created with
forNodes(String) or forNodes(String, Map).indexName - the name of the node index.Index corresponding to the indexName.Index<Node> forNodes(String indexName, Map<String,String> customConfiguration)
Index for Nodes with the name indexName.
If the index exists it will be returned if the provider and customConfiguration
matches, else an IllegalArgumentException will be thrown.
If the index doesn't exist it will be created with the given
provider (given in the configuration map).indexName - the name of the index to create.customConfiguration - configuration for the index being created.
Use the IndexImplementation to use for this index if it's created. The
value represents the service name corresponding to the IndexImplementation.
Other options can f.ex. say that the index will be a fulltext index and that it
should be case insensitive. The parameters given here (except "provider") are
only interpreted by the implementation represented by the provider.String[] nodeIndexNames()
Node indexes.
Those names can then be used to get to the actual Index
instances.Node indexes.boolean existsForRelationships(String indexName)
indexName. Indexes are created when needed in calls to
forRelationships(String) and forRelationships(String, Map).indexName - the name of the index to check.indexName.RelationshipIndex forRelationships(String indexName)
Index for Relationships with the name indexName.
If such an index doesn't exist it will be created with default configuration.
Indexes created with forRelationships(String, Map) can be returned by this
method also, so that you don't have to supply and match its configuration
for consecutive accesses.
This is the prefered way of accessing indexes, whether they were created with
forRelationships(String) or forRelationships(String, Map).indexName - the name of the node index.Index corresponding to the indexName.RelationshipIndex forRelationships(String indexName, Map<String,String> customConfiguration)
Index for Relationships with the name indexName.
If the index exists it will be returned if the provider and customConfiguration
matches, else an IllegalArgumentException will be thrown.
If the index doesn't exist it will be created with the given
provider (given in the configuration map).indexName - the name of the index to create.customConfiguration - configuration for the index being created.
Use the IndexImplementation to use for this index if it's created. The
value represents the service name corresponding to the IndexImplementation.
Other options can f.ex. say that the index will be a fulltext index and that it
should be case insensitive. The parameters given here (except "provider") are
only interpreted by the implementation represented by the provider.String[] relationshipIndexNames()
Relationship indexes.
Those names can then be used to get to the actual Index
instances.Relationship indexes.Map<String,String> getConfiguration(Index<? extends PropertyContainer> index)
index. Configuration can be
set when creating an index, with f.ex forNodes(String, Map)
or with setConfiguration(Index, String, String) or
removeConfiguration(Index, String).index.String setConfiguration(Index<? extends PropertyContainer> index, String key, String value)
key it will be overwritten.
WARNING: Overwriting parameters which controls the storage format of index
data may lead to existing index data being unusable.
The key "provider" is a reserved parameter and cannot be overwritten,
if key is "provider" then an IllegalArgumentException will be thrown.index - the index to set a configuration parameter for.key - the configuration parameter key.value - the new value of the configuration parameter.String removeConfiguration(Index<? extends PropertyContainer> index, String key)
key nothing will happen and null
will be returned.
WARNING: Removing parameters which controls the storage format of index
data may lead to existing index data being unusable.
The key "provider" is a reserved parameter and cannot be removed,
if key is "provider" then an IllegalArgumentException will be thrown.index - the index to remove a configuration parameter from.key - the configuration parameter key.AutoIndexer<Node> getNodeAutoIndexer()
RelationshipAutoIndexer getRelationshipAutoIndexer()
Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.