Record Class GroupDocs<T>
java.lang.Object
java.lang.Record
org.apache.lucene.search.grouping.GroupDocs<T>
- Record Components:
score- Overall aggregated score of this group (currently only set by join queries).maxScore- Max score in this grouptotalHits- Total hits within this groupscoreDocs- Hits; this may beFieldDocinstances if the withinGroupSort sorted by fields.groupValue- The groupField value for all docs in this group; this may be null if hits did not have the groupField.groupSortValues- Matches the groupSort passed toFirstPassGroupingCollector.
public record GroupDocs<T>(float score, float maxScore, TotalHits totalHits, ScoreDoc[] scoreDocs, T groupValue, Object[] groupSortValues)
extends Record
Represents one group in the results.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Object[]Returns the value of thegroupSortValuesrecord component.Returns the value of thegroupValuerecord component.final inthashCode()Returns a hash code value for this object.floatmaxScore()Returns the value of themaxScorerecord component.floatscore()Returns the value of thescorerecord component.ScoreDoc[]Returns the value of thescoreDocsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalHitsrecord component.
-
Constructor Details
-
GroupDocs
public GroupDocs(float score, float maxScore, TotalHits totalHits, ScoreDoc[] scoreDocs, T groupValue, Object[] groupSortValues) Creates an instance of aGroupDocsrecord class.- Parameters:
score- the value for thescorerecord componentmaxScore- the value for themaxScorerecord componenttotalHits- the value for thetotalHitsrecord componentscoreDocs- the value for thescoreDocsrecord componentgroupValue- the value for thegroupValuerecord componentgroupSortValues- the value for thegroupSortValuesrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
score
public float score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
maxScore
public float maxScore()Returns the value of themaxScorerecord component.- Returns:
- the value of the
maxScorerecord component
-
totalHits
Returns the value of thetotalHitsrecord component.- Returns:
- the value of the
totalHitsrecord component
-
scoreDocs
Returns the value of thescoreDocsrecord component.- Returns:
- the value of the
scoreDocsrecord component
-
groupValue
Returns the value of thegroupValuerecord component.- Returns:
- the value of the
groupValuerecord component
-
groupSortValues
Returns the value of thegroupSortValuesrecord component.- Returns:
- the value of the
groupSortValuesrecord component
-