Package org.opensearch.search
Class MockSearchService
java.lang.Object
org.opensearch.common.component.AbstractLifecycleComponent
org.opensearch.search.SearchService
org.opensearch.search.MockSearchService
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.opensearch.common.component.LifecycleComponent,org.opensearch.common.lease.Releasable,org.opensearch.index.shard.IndexEventListener
public class MockSearchService
extends org.opensearch.search.SearchService
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMockSearchService.TestPluginMarker plugin used byMockNodeto enableMockSearchService. -
Field Summary
Fields inherited from class org.opensearch.search.SearchService
ALLOW_EXPENSIVE_QUERIES, DEFAULT_ALLOW_PARTIAL_SEARCH_RESULTS, DEFAULT_FROM, DEFAULT_KEEPALIVE_SETTING, DEFAULT_SEARCH_TIMEOUT_SETTING, DEFAULT_SIZE, KEEPALIVE_INTERVAL_SETTING, LOW_LEVEL_CANCELLATION_SETTING, MAX_KEEPALIVE_SETTING, MAX_OPEN_SCROLL_CONTEXT, NO_TIMEOUT -
Constructor Summary
Constructors Constructor Description 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.fetch.FetchPhase fetchPhase, org.opensearch.indices.breaker.CircuitBreakerService circuitBreakerService) -
Method Summary
Modifier and Type Method Description static voidassertNoInFlightContext()Throw anAssertionErrorif there are still in-flight contexts.protected voidputReaderContext(org.opensearch.search.internal.ReaderContext context)protected org.opensearch.search.internal.ReaderContextremoveReaderContext(long id)voidsetOnPutContext(java.util.function.Consumer<org.opensearch.search.internal.ReaderContext> onPutContext)Methods inherited from class org.opensearch.search.SearchService
afterIndexRemoved, aggReduceContextBuilder, buildAliasFilter, canMatch, canMatch, canRewriteToMatchNone, createSearchContext, defaultAllowPartialSearchResults, doClose, doStart, doStop, executeDfsPhase, executeFetchPhase, executeFetchPhase, executeQueryPhase, executeQueryPhase, executeQueryPhase, freeAllScrollContexts, freeReaderContext, getActiveContexts, getIndicesService, getResponseCollectorService, getRewriteContext, openReaderContextMethods inherited from class org.opensearch.common.component.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, onShardInactive, 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.fetch.FetchPhase fetchPhase, org.opensearch.indices.breaker.CircuitBreakerService circuitBreakerService)
-
-
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
public void setOnPutContext(java.util.function.Consumer<org.opensearch.search.internal.ReaderContext> onPutContext)
-