Class ShardFieldUsageTracker

java.lang.Object
org.elasticsearch.index.search.stats.ShardFieldUsageTracker

public class ShardFieldUsageTracker extends Object
Records and provides field usage stats
  • Constructor Details

    • ShardFieldUsageTracker

      public ShardFieldUsageTracker()
  • Method Details

    • createSession

      Returns a new session which can be passed to a FieldUsageTrackingDirectoryReader to track field usage of a shard. Fields tracked as part of a session are only counted as a single use. The stats are then recorded for this shard when the corresponding session is closed.
    • stats

      public FieldUsageStats stats(String... fields)
      Returns field usage stats for the given fields. If no subset of fields is specified, returns information for all fields.