Record Class ShardFieldStats

java.lang.Object
java.lang.Record
org.elasticsearch.index.shard.ShardFieldStats
Record Components:
numSegments - the number of segments
totalFields - the total number of fields across the segments
fieldUsages - the number of usages for segment-level fields (e.g., doc_values, postings, norms, points) -1 if unavailable
postingsInMemoryBytes - the total bytes in memory used for postings across all fields
liveDocsBytes - the total bytes in memory used for live docs

public record ShardFieldStats(int numSegments, int totalFields, long fieldUsages, long postingsInMemoryBytes, long liveDocsBytes) extends Record
A per shard stats including the number of segments and total fields across those segments. These stats should be recomputed whenever the shard is refreshed.
  • Field Details

    • TRACK_LIVE_DOCS_IN_MEMORY_BYTES

      public static final FeatureFlag TRACK_LIVE_DOCS_IN_MEMORY_BYTES
    • FIXED_BITSET_BASE_RAM_BYTES_USED

      public static final long FIXED_BITSET_BASE_RAM_BYTES_USED
  • Constructor Details

    • ShardFieldStats

      public ShardFieldStats(int numSegments, int totalFields, long fieldUsages, long postingsInMemoryBytes, long liveDocsBytes)
      Creates an instance of a ShardFieldStats record class.
      Parameters:
      numSegments - the value for the numSegments record component
      totalFields - the value for the totalFields record component
      fieldUsages - the value for the fieldUsages record component
      postingsInMemoryBytes - the value for the postingsInMemoryBytes record component
      liveDocsBytes - the value for the liveDocsBytes record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • numSegments

      public int numSegments()
      Returns the value of the numSegments record component.
      Returns:
      the value of the numSegments record component
    • totalFields

      public int totalFields()
      Returns the value of the totalFields record component.
      Returns:
      the value of the totalFields record component
    • fieldUsages

      public long fieldUsages()
      Returns the value of the fieldUsages record component.
      Returns:
      the value of the fieldUsages record component
    • postingsInMemoryBytes

      public long postingsInMemoryBytes()
      Returns the value of the postingsInMemoryBytes record component.
      Returns:
      the value of the postingsInMemoryBytes record component
    • liveDocsBytes

      public long liveDocsBytes()
      Returns the value of the liveDocsBytes record component.
      Returns:
      the value of the liveDocsBytes record component