Class MockSearchService
java.lang.Object
org.opensearch.common.lifecycle.AbstractLifecycleComponent
org.opensearch.search.SearchService
org.opensearch.search.MockSearchService
- All Implemented Interfaces:
Closeable,AutoCloseable,org.opensearch.common.lease.Releasable,org.opensearch.common.lifecycle.LifecycleComponent,org.opensearch.index.shard.IndexEventListener
public class MockSearchService
extends org.opensearch.search.SearchService
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMarker plugin used byMockNodeto enableMockSearchService.Nested classes/interfaces inherited from class org.opensearch.search.SearchService
org.opensearch.search.SearchService.CanMatchResponse -
Field Summary
Fields inherited from class org.opensearch.search.SearchService
AGGREGATION_REWRITE_FILTER_SEGMENT_THRESHOLD, ALLOW_EXPENSIVE_QUERIES, BUCKET_SELECTION_STRATEGY_FACTOR_SETTING, CARDINALITY_AGGREGATION_PRUNING_THRESHOLD, CLUSTER_ALLOW_DERIVED_FIELD_SETTING, CLUSTER_CONCURRENT_SEGMENT_SEARCH_MODE, CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING, CONCURRENT_SEGMENT_SEARCH_DEFAULT_SLICE_COUNT_VALUE, CONCURRENT_SEGMENT_SEARCH_MAX_SLICE_COUNT_KEY, CONCURRENT_SEGMENT_SEARCH_MIN_SLICE_COUNT_VALUE, CONCURRENT_SEGMENT_SEARCH_MODE_ALL, CONCURRENT_SEGMENT_SEARCH_MODE_AUTO, CONCURRENT_SEGMENT_SEARCH_MODE_NONE, CONCURRENT_SEGMENT_SEARCH_TARGET_MAX_SLICE_COUNT_SETTING, DEFAULT_ALLOW_PARTIAL_SEARCH_RESULTS, DEFAULT_BUCKET_SELECTION_STRATEGY_FACTOR, DEFAULT_FROM, DEFAULT_KEEPALIVE_SETTING, DEFAULT_SEARCH_TIMEOUT_SETTING, DEFAULT_SIZE, INDICES_MAX_CLAUSE_COUNT_SETTING, KEEPALIVE_INTERVAL_SETTING, KEYWORD_INDEX_OR_DOC_VALUES_ENABLED, LOW_LEVEL_CANCELLATION_SETTING, MAX_AGGREGATION_REWRITE_FILTERS, MAX_KEEPALIVE_SETTING, MAX_OPEN_PIT_CONTEXT, MAX_OPEN_SCROLL_CONTEXT, MAX_PIT_KEEPALIVE_SETTING, NO_TIMEOUT, QUERY_REWRITING_ENABLED_SETTING, QUERY_REWRITING_TERMS_THRESHOLD_SETTING, SEARCH_MAX_QUERY_STRING_LENGTHFields inherited from class org.opensearch.common.lifecycle.AbstractLifecycleComponent
lifecycle -
Constructor Summary
ConstructorsConstructorDescriptionMockSearchService(org.opensearch.cluster.service.ClusterService clusterService, org.opensearch.indices.IndicesService indicesService, org.opensearch.threadpool.ThreadPool threadPool, org.opensearch.script.ScriptService scriptService, org.opensearch.common.util.BigArrays bigArrays, org.opensearch.search.query.QueryPhase queryPhase, org.opensearch.search.fetch.FetchPhase fetchPhase, org.opensearch.core.indices.breaker.CircuitBreakerService circuitBreakerService, Executor indexSearcherExecutor, org.opensearch.tasks.TaskResourceTrackingService taskResourceTrackingService) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidThrow anAssertionErrorif there are still in-flight contexts.protected voidputReaderContext(org.opensearch.search.internal.ReaderContext context) protected org.opensearch.search.internal.ReaderContextremoveReaderContext(long id) voidsetOnPutContext(Consumer<org.opensearch.search.internal.ReaderContext> onPutContext) Methods inherited from class org.opensearch.search.SearchService
afterIndexRemoved, aggReduceContextBuilder, buildAliasFilter, canMatch, canMatch, canMatchSearchAfter, canRewriteToMatchNone, createPitReaderContext, createSearchContext, createSearchContext, createValidationContext, defaultAllowPartialSearchResults, doClose, doStart, doStop, executeDfsPhase, executeDfsPhase, executeFetchPhase, executeFetchPhase, executeFetchPhase, executeQueryPhase, executeQueryPhase, executeQueryPhase, executeQueryPhase, executeQueryPhase, freeAllScrollContexts, freeReaderContext, freeReaderContextsIfFound, getActiveContexts, getAllPITReaderContexts, getIndicesService, getPitReaderContext, getResponseCollectorService, getRewriteContext, getValidationRewriteContext, updatePitIdAndKeepAliveMethods inherited from class org.opensearch.common.lifecycle.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.index.shard.IndexEventListener
afterIndexCreated, afterIndexShardClosed, afterIndexShardCreated, afterIndexShardDeleted, afterIndexShardStarted, beforeIndexAddedToCluster, beforeIndexCreated, beforeIndexRemoved, beforeIndexShardClosed, beforeIndexShardCreated, beforeIndexShardDeleted, beforeIndexShardRecovery, indexShardStateChanged, onStoreClosed, onStoreCreated, shardRoutingChanged
-
Constructor Details
-
MockSearchService
public MockSearchService(org.opensearch.cluster.service.ClusterService clusterService, org.opensearch.indices.IndicesService indicesService, org.opensearch.threadpool.ThreadPool threadPool, org.opensearch.script.ScriptService scriptService, org.opensearch.common.util.BigArrays bigArrays, org.opensearch.search.query.QueryPhase queryPhase, org.opensearch.search.fetch.FetchPhase fetchPhase, org.opensearch.core.indices.breaker.CircuitBreakerService circuitBreakerService, Executor indexSearcherExecutor, org.opensearch.tasks.TaskResourceTrackingService taskResourceTrackingService)
-
-
Method Details
-
assertNoInFlightContext
public static void assertNoInFlightContext()Throw anAssertionErrorif there are still in-flight contexts. -
putReaderContext
protected void putReaderContext(org.opensearch.search.internal.ReaderContext context) - Overrides:
putReaderContextin classorg.opensearch.search.SearchService
-
removeReaderContext
protected org.opensearch.search.internal.ReaderContext removeReaderContext(long id) - Overrides:
removeReaderContextin classorg.opensearch.search.SearchService
-
setOnPutContext
-