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- theTopDocsas wel as the optional maximum scoresortValueFormats- the fields that the request was sorted onterminatedAfter- whether the request was early terminated, based on theterminate_afterfunctionalitycollectorResult- 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
ConstructorsConstructorDescriptionQueryPhaseResult(TopDocsAndMaxScore topDocsAndMaxScore, DocValueFormat[] sortValueFormats, boolean terminatedAfter, CollectorResult collectorResult) Creates an instance of aQueryPhaseResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecollectorResultrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thesortValueFormatsrecord component.booleanReturns the value of theterminatedAfterrecord component.Returns the value of thetopDocsAndMaxScorerecord component.final StringtoString()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 aQueryPhaseResultrecord class.- Parameters:
topDocsAndMaxScore- the value for thetopDocsAndMaxScorerecord componentsortValueFormats- the value for thesortValueFormatsrecord componentterminatedAfter- the value for theterminatedAfterrecord componentcollectorResult- the value for thecollectorResultrecord 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 thetopDocsAndMaxScorerecord component.- Returns:
- the value of the
topDocsAndMaxScorerecord component
-
sortValueFormats
Returns the value of thesortValueFormatsrecord component.- Returns:
- the value of the
sortValueFormatsrecord component
-
terminatedAfter
public boolean terminatedAfter()Returns the value of theterminatedAfterrecord component.- Returns:
- the value of the
terminatedAfterrecord component
-
collectorResult
Returns the value of thecollectorResultrecord component.- Returns:
- the value of the
collectorResultrecord component
-