public class SearchService extends AbstractLifecycleComponent implements IndexEventListener
Modifier and Type | Field and Description |
---|---|
static Setting<TimeValue> |
DEFAULT_KEEPALIVE_SETTING |
static Setting<TimeValue> |
DEFAULT_SEARCH_TIMEOUT_SETTING |
static Setting<TimeValue> |
KEEPALIVE_INTERVAL_SETTING |
static Setting<java.lang.Boolean> |
LOW_LEVEL_CANCELLATION_SETTING
Enables low-level, frequent search cancellation checks.
|
static TimeValue |
NO_TIMEOUT |
lifecycle
deprecationLogger, logger, settings
Constructor and Description |
---|
SearchService(ClusterService clusterService,
IndicesService indicesService,
ThreadPool threadPool,
ScriptService scriptService,
BigArrays bigArrays,
FetchPhase fetchPhase) |
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
logDeprecatedSetting, logRemovedSetting, nodeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterIndexCreated, afterIndexShardClosed, afterIndexShardCreated, afterIndexShardDeleted, afterIndexShardStarted, beforeIndexAddedToCluster, beforeIndexCreated, beforeIndexRemoved, beforeIndexShardClosed, beforeIndexShardCreated, beforeIndexShardDeleted, indexShardStateChanged, onShardInactive, onStoreClosed, shardRoutingChanged
public static final Setting<java.lang.Boolean> LOW_LEVEL_CANCELLATION_SETTING
public static final TimeValue NO_TIMEOUT
public SearchService(ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ScriptService scriptService, BigArrays bigArrays, FetchPhase fetchPhase)
public void afterIndexRemoved(Index index, IndexSettings indexSettings, IndicesClusterStateService.AllocatedIndices.IndexRemovalReason reason)
IndexEventListener
afterIndexRemoved
in interface IndexEventListener
index
- The indexreason
- the reason for index removalprotected void putContext(SearchContext context)
protected SearchContext removeContext(long id)
protected void doStart()
doStart
in class AbstractLifecycleComponent
protected void doStop()
doStop
in class AbstractLifecycleComponent
protected void doClose()
doClose
in class AbstractLifecycleComponent
public DfsSearchResult executeDfsPhase(ShardSearchRequest request, SearchTask task) throws java.io.IOException
java.io.IOException
public SearchPhaseResult executeQueryPhase(ShardSearchRequest request, SearchTask task) throws java.io.IOException
java.io.IOException
public ScrollQuerySearchResult executeQueryPhase(InternalScrollSearchRequest request, SearchTask task)
public QuerySearchResult executeQueryPhase(QuerySearchRequest request, SearchTask task)
public ScrollQueryFetchSearchResult executeFetchPhase(InternalScrollSearchRequest request, SearchTask task)
public FetchSearchResult executeFetchPhase(ShardFetchRequest request, SearchTask task)
public org.elasticsearch.search.DefaultSearchContext createSearchContext(ShardSearchRequest request, TimeValue timeout, @Nullable Engine.Searcher searcher) throws java.io.IOException
java.io.IOException
public boolean freeContext(long id)
public void freeAllScrollContexts()
public int getActiveContexts()
public AliasFilter buildAliasFilter(ClusterState state, java.lang.String index, java.lang.String... expressions)