Package org.elasticsearch.index.query
Class CoordinatorRewriteContext
java.lang.Object
org.elasticsearch.index.query.QueryRewriteContext
org.elasticsearch.index.query.CoordinatorRewriteContext
public class CoordinatorRewriteContext extends QueryRewriteContext
Context object used to rewrite
QueryBuilder
instances into simplified version in the coordinator.
Instances of this object rely on information stored in the IndexMetadata
for certain indices.
Right now this context object is able to rewrite range queries that include a known timestamp field
(i.e. the timestamp field for DataStreams) into a MatchNoneQueryBuilder and skip the shards that
don't hold queried data. See IndexMetadata#getTimestampRange() for more details-
Field Summary
Fields inherited from class org.elasticsearch.index.query.QueryRewriteContext
client, nowInMillis
-
Constructor Summary
Constructors Constructor Description CoordinatorRewriteContext(org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, NamedWriteableRegistry writeableRegistry, Client client, java.util.function.LongSupplier nowInMillis, Index index, IndexLongFieldRange indexLongFieldRange, DateFieldMapper.DateFieldType timestampFieldType)
-
Method Summary
Modifier and Type Method Description CoordinatorRewriteContext
convertToCoordinatorRewriteContext()
MappedFieldType
getFieldType(java.lang.String fieldName)
Methods inherited from class org.elasticsearch.index.query.QueryRewriteContext
convertToSearchExecutionContext, executeAsyncActions, getWriteableRegistry, getXContentRegistry, hasAsyncActions, nowInMillis, registerAsyncAction
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CoordinatorRewriteContext
public CoordinatorRewriteContext(org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, NamedWriteableRegistry writeableRegistry, Client client, java.util.function.LongSupplier nowInMillis, Index index, IndexLongFieldRange indexLongFieldRange, DateFieldMapper.DateFieldType timestampFieldType)
-
-
Method Details
-
getFieldType
-
convertToCoordinatorRewriteContext
- Overrides:
convertToCoordinatorRewriteContext
in classQueryRewriteContext
-