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 or the 'event.ingested' field in ECS) into a MatchNoneQueryBuilder and skip the shards that don't hold queried data. See IndexMetadata for more details.
  • Field Details

  • Constructor Details

    • CoordinatorRewriteContext

      public CoordinatorRewriteContext(XContentParserConfiguration parserConfig, Client client, LongSupplier nowInMillis, @Nullable DateFieldRangeInfo dateFieldRangeInfo, String tier)
      Context for coordinator search rewrites based on time ranges for the @timestamp field and/or 'event.ingested' field
      Parameters:
      parserConfig -
      client -
      nowInMillis -
      dateFieldRangeInfo - range and field type info for @timestamp and 'event.ingested'
      tier - the configured data tier (via the _tier_preference setting) for the index
  • Method Details