public final class IndexService extends AbstractIndexComponent implements IndexComponent, java.lang.Iterable<IndexShard>
Modifier and Type | Class and Description |
---|---|
static interface |
IndexService.ShardStoreDeleter |
deprecationLogger, logger
Constructor and Description |
---|
IndexService(IndexSettings indexSettings,
NodeEnvironment nodeEnv,
SimilarityService similarityService,
IndexService.ShardStoreDeleter shardStoreDeleter,
AnalysisRegistry registry,
EngineFactory engineFactory,
NodeServicesProvider nodeServicesProvider,
QueryCache queryCache,
IndexStore indexStore,
IndexEventListener eventListener,
IndexModule.IndexSearcherWrapperFactory wrapperFactory,
MapperRegistry mapperRegistry,
IndicesFieldDataCache indicesFieldDataCache,
java.util.List<SearchOperationListener> searchOperationListeners,
java.util.List<IndexingOperationListener> indexingOperationListeners) |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.search.Query |
aliasFilter(QueryShardContext context,
java.lang.String... aliasNames)
Returns the filter associated with listed filtering aliases.
|
AnalysisService |
analysisService() |
IndexCache |
cache() |
void |
close(java.lang.String reason,
boolean delete) |
IndexShard |
createShard(ShardRouting routing) |
IndexFieldDataService |
fieldData() |
BigArrays |
getBigArrays() |
IndexEventListener |
getIndexEventListener() |
NodeServicesProvider |
getIndexServices() |
IndexSettings |
getIndexSettings() |
IndexMetaData |
getMetaData() |
IndexShard |
getShard(int shardId)
Return the shard with the provided id, or throw an exception if it doesn't exist.
|
IndexShard |
getShardOrNull(int shardId)
Return the shard with the provided id, or null if there is no such shard.
|
ThreadPool |
getThreadPool() |
boolean |
hasShard(int shardId) |
java.lang.String |
indexUUID() |
java.util.Iterator<IndexShard> |
iterator() |
MapperService |
mapperService() |
QueryShardContext |
newQueryShardContext()
Creates a new QueryShardContext.
|
QueryShardContext |
newQueryShardContext(org.apache.lucene.index.IndexReader indexReader)
Creates a new QueryShardContext.
|
int |
numberOfShards() |
void |
removeShard(int shardId,
java.lang.String reason) |
java.util.Set<java.lang.Integer> |
shardIds() |
SimilarityService |
similarityService() |
void |
updateMetaData(IndexMetaData metadata) |
index
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
index
public IndexService(IndexSettings indexSettings, NodeEnvironment nodeEnv, SimilarityService similarityService, IndexService.ShardStoreDeleter shardStoreDeleter, AnalysisRegistry registry, @Nullable EngineFactory engineFactory, NodeServicesProvider nodeServicesProvider, QueryCache queryCache, IndexStore indexStore, IndexEventListener eventListener, IndexModule.IndexSearcherWrapperFactory wrapperFactory, MapperRegistry mapperRegistry, IndicesFieldDataCache indicesFieldDataCache, java.util.List<SearchOperationListener> searchOperationListeners, java.util.List<IndexingOperationListener> indexingOperationListeners) throws java.io.IOException
java.io.IOException
public int numberOfShards()
public IndexEventListener getIndexEventListener()
public java.util.Iterator<IndexShard> iterator()
iterator
in interface java.lang.Iterable<IndexShard>
public boolean hasShard(int shardId)
@Nullable public IndexShard getShardOrNull(int shardId)
public IndexShard getShard(int shardId)
public java.util.Set<java.lang.Integer> shardIds()
public IndexCache cache()
public IndexFieldDataService fieldData()
public AnalysisService analysisService()
public MapperService mapperService()
public SimilarityService similarityService()
public void close(java.lang.String reason, boolean delete) throws java.io.IOException
java.io.IOException
public java.lang.String indexUUID()
public IndexShard createShard(ShardRouting routing) throws java.io.IOException
java.io.IOException
public void removeShard(int shardId, java.lang.String reason)
public NodeServicesProvider getIndexServices()
public IndexSettings getIndexSettings()
getIndexSettings
in class AbstractIndexComponent
public QueryShardContext newQueryShardContext(org.apache.lucene.index.IndexReader indexReader)
QueryShardContext.setTypes(String...)
public QueryShardContext newQueryShardContext()
QueryShardContext.setTypes(String...)
. This context may be used for query parsing but cannot be
used for rewriting since it does not know about the current IndexReader
.public ThreadPool getThreadPool()
public BigArrays getBigArrays()
public org.apache.lucene.search.Query aliasFilter(QueryShardContext context, java.lang.String... aliasNames)
The list of filtering aliases should be obtained by calling MetaData.filteringAliases. Returns null if no filtering is required.
public IndexMetaData getMetaData()
public void updateMetaData(IndexMetaData metadata)