Class LegacyReaderContext
java.lang.Object
org.elasticsearch.search.internal.ReaderContext
org.elasticsearch.search.internal.LegacyReaderContext
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.elasticsearch.core.Releasable
-
Field Summary
Fields inherited from class org.elasticsearch.search.internal.ReaderContext
searcherSupplier
-
Constructor Summary
ConstructorDescriptionLegacyReaderContext(ShardSearchContextId id, IndexService indexService, IndexShard indexShard, Engine.SearcherSupplier reader, ShardSearchRequest shardSearchRequest, long keepAliveInMillis)
-
Method Summary
Modifier and TypeMethodDescriptionacquireSearcher(String source)
getAggregatedDfs(AggregatedDfs other)
getRescoreDocIds(RescoreDocIds other)
void
setAggregatedDfs(AggregatedDfs aggregatedDfs)
void
setRescoreDocIds(RescoreDocIds rescoreDocIds)
boolean
Returnstrue
for readers that are intended to use in a single query.Methods inherited from class org.elasticsearch.search.internal.ReaderContext
addOnClose, close, getFromContext, getStartTimeInNano, id, indexService, indexShard, isExpired, markAsUsed, putInContext, validate
-
Constructor Details
-
LegacyReaderContext
public LegacyReaderContext(ShardSearchContextId id, IndexService indexService, IndexShard indexShard, Engine.SearcherSupplier reader, ShardSearchRequest shardSearchRequest, long keepAliveInMillis)
-
-
Method Details
-
acquireSearcher
- Overrides:
acquireSearcher
in classReaderContext
-
getShardSearchRequest
- Overrides:
getShardSearchRequest
in classReaderContext
-
scrollContext
- Overrides:
scrollContext
in classReaderContext
-
getAggregatedDfs
- Overrides:
getAggregatedDfs
in classReaderContext
-
setAggregatedDfs
- Overrides:
setAggregatedDfs
in classReaderContext
-
getRescoreDocIds
- Overrides:
getRescoreDocIds
in classReaderContext
-
setRescoreDocIds
- Overrides:
setRescoreDocIds
in classReaderContext
-
singleSession
public boolean singleSession()Description copied from class:ReaderContext
Returnstrue
for readers that are intended to use in a single query. For readers that are intended to use in multiple queries (i.e., scroll or readers), we should not release them after the fetch phase or the query phase with empty results.- Overrides:
singleSession
in classReaderContext
-