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

public record ShardFieldStats(int numSegments, int totalFields, long fieldUsages) 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.
  • Constructor Details

    • ShardFieldStats

      public ShardFieldStats(int numSegments, int totalFields, long fieldUsages)
      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
  • 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