Module org.elasticsearch.server
Package org.elasticsearch.search.query
Record Class QueryPhaseResult
java.lang.Object
java.lang.Record
org.elasticsearch.search.query.QueryPhaseResult
- Record Components:
topDocsAndMaxScore
- theTopDocs
as wel as the optional maximum scoresortValueFormats
- the fields that the request was sorted onterminatedAfter
- whether the request was early terminated, based on theterminate_after
functionalitycollectorResult
- the profile result (when profiling was enabled)
public record QueryPhaseResult(TopDocsAndMaxScore topDocsAndMaxScore, DocValueFormat[] sortValueFormats, boolean terminatedAfter, CollectorResult collectorResult)
extends Record
Includes result returned by a search operation as part of the query phase.
-
Constructor Summary
ConstructorDescriptionQueryPhaseResult
(TopDocsAndMaxScore topDocsAndMaxScore, DocValueFormat[] sortValueFormats, boolean terminatedAfter, CollectorResult collectorResult) Creates an instance of aQueryPhaseResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecollectorResult
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thesortValueFormats
record component.boolean
Returns the value of theterminatedAfter
record component.Returns the value of thetopDocsAndMaxScore
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
QueryPhaseResult
public QueryPhaseResult(TopDocsAndMaxScore topDocsAndMaxScore, DocValueFormat[] sortValueFormats, boolean terminatedAfter, CollectorResult collectorResult) Creates an instance of aQueryPhaseResult
record class.- Parameters:
topDocsAndMaxScore
- the value for thetopDocsAndMaxScore
record componentsortValueFormats
- the value for thesortValueFormats
record componentterminatedAfter
- the value for theterminatedAfter
record componentcollectorResult
- the value for thecollectorResult
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
topDocsAndMaxScore
Returns the value of thetopDocsAndMaxScore
record component.- Returns:
- the value of the
topDocsAndMaxScore
record component
-
sortValueFormats
Returns the value of thesortValueFormats
record component.- Returns:
- the value of the
sortValueFormats
record component
-
terminatedAfter
public boolean terminatedAfter()Returns the value of theterminatedAfter
record component.- Returns:
- the value of the
terminatedAfter
record component
-
collectorResult
Returns the value of thecollectorResult
record component.- Returns:
- the value of the
collectorResult
record component
-