Package org.opensearch.index.rankeval
Class RatedSearchHit
java.lang.Object
org.opensearch.index.rankeval.RatedSearchHit
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
public class RatedSearchHit extends java.lang.Object implements Writeable, ToXContentObject
Combines a
SearchHit with a document rating.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object> -
Field Summary
-
Constructor Summary
Constructors Constructor Description RatedSearchHit(SearchHit searchHit, java.util.OptionalInt rating) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.OptionalIntgetRating()SearchHitgetSearchHit()inthashCode()static RatedSearchHitparse(XContentParser parser)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)
-
Constructor Details
-
Method Details
-
writeTo
-
getSearchHit
-
getRating
public java.util.OptionalInt getRating() -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
parse
- Throws:
java.io.IOException
-
equals
public final boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()- Overrides:
hashCodein classjava.lang.Object
-