org.elasticsearch.indices
Interface IndicesService

All Superinterfaces:
CloseableComponent, java.lang.Iterable<IndexService>, LifecycleComponent<IndicesService>
All Known Implementing Classes:
InternalIndicesService

@ThreadSafe
public interface IndicesService
extends java.lang.Iterable<IndexService>, LifecycleComponent<IndicesService>


Method Summary
 boolean changesAllowed()
          Returns true if changes (adding / removing) indices, shards and so on are allowed.
 IndexService createIndex(java.lang.String index, Settings settings, java.lang.String localNodeId)
           
 void deleteIndex(java.lang.String index)
           
 boolean hasIndex(java.lang.String index)
           
 IndexService indexService(java.lang.String index)
           
 IndexService indexServiceSafe(java.lang.String index)
           
 java.util.Set<java.lang.String> indices()
           
 IndicesLifecycle indicesLifecycle()
           
 GroupShardsIterator searchShards(ClusterState clusterState, java.lang.String[] indices, java.lang.String queryHint)
          Gets all the "searchable" shards on all the given indices.
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface org.elasticsearch.util.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.util.component.CloseableComponent
close
 

Method Detail

changesAllowed

boolean changesAllowed()
Returns true if changes (adding / removing) indices, shards and so on are allowed.


hasIndex

boolean hasIndex(java.lang.String index)

indicesLifecycle

IndicesLifecycle indicesLifecycle()

indices

java.util.Set<java.lang.String> indices()

indexService

IndexService indexService(java.lang.String index)

indexServiceSafe

IndexService indexServiceSafe(java.lang.String index)
                              throws IndexMissingException
Throws:
IndexMissingException

searchShards

GroupShardsIterator searchShards(ClusterState clusterState,
                                 java.lang.String[] indices,
                                 java.lang.String queryHint)
                                 throws ElasticSearchException
Gets all the "searchable" shards on all the given indices.

Throws:
ElasticSearchException
See Also:
OperationRouting.searchShards(org.elasticsearch.cluster.ClusterState, String)

createIndex

IndexService createIndex(java.lang.String index,
                         Settings settings,
                         java.lang.String localNodeId)
                         throws ElasticSearchException
Throws:
ElasticSearchException

deleteIndex

void deleteIndex(java.lang.String index)
                 throws ElasticSearchException
Throws:
ElasticSearchException