java.lang.Object
java.lang.Record
org.elasticsearch.index.shard.ShardFieldStats
- Record Components:
numSegments- the number of segmentstotalFields- the total number of fields across the segmentsfieldUsages- the number of usages for segment-level fields (e.g., doc_values, postings, norms, points) -1 if unavailable
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 Summary
ConstructorsConstructorDescriptionShardFieldStats(int numSegments, int totalFields, long fieldUsages) Creates an instance of aShardFieldStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefieldUsagesrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thenumSegmentsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalFieldsrecord component.
-
Constructor Details
-
ShardFieldStats
public ShardFieldStats(int numSegments, int totalFields, long fieldUsages) Creates an instance of aShardFieldStatsrecord class.- Parameters:
numSegments- the value for thenumSegmentsrecord componenttotalFields- the value for thetotalFieldsrecord componentfieldUsages- the value for thefieldUsagesrecord component
-
-
Method Details
-
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. -
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. -
equals
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 '=='. -
numSegments
public int numSegments()Returns the value of thenumSegmentsrecord component.- Returns:
- the value of the
numSegmentsrecord component
-
totalFields
public int totalFields()Returns the value of thetotalFieldsrecord component.- Returns:
- the value of the
totalFieldsrecord component
-
fieldUsages
public long fieldUsages()Returns the value of thefieldUsagesrecord component.- Returns:
- the value of the
fieldUsagesrecord component
-