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 aShardFieldStats
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.long
Returns the value of thefieldUsages
record component.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thenumSegments
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of thetotalFields
record component.
-
Constructor Details
-
ShardFieldStats
public ShardFieldStats(int numSegments, int totalFields, long fieldUsages) Creates an instance of aShardFieldStats
record class.- Parameters:
numSegments
- the value for thenumSegments
record componenttotalFields
- the value for thetotalFields
record componentfieldUsages
- the value for thefieldUsages
record 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 thenumSegments
record component.- Returns:
- the value of the
numSegments
record component
-
totalFields
public int totalFields()Returns the value of thetotalFields
record component.- Returns:
- the value of the
totalFields
record component
-
fieldUsages
public long fieldUsages()Returns the value of thefieldUsages
record component.- Returns:
- the value of the
fieldUsages
record component
-