Package org.elasticsearch.index.rankeval
Class RatedSearchHit
- java.lang.Object
-
- org.elasticsearch.index.rankeval.RatedSearchHit
-
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
public class RatedSearchHit extends java.lang.Object implements Writeable, ToXContentObject
Combines aSearchHitwith a document rating.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object>
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description RatedSearchHit(SearchHit searchHit, java.util.Optional<java.lang.Integer> rating)
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.Optional<java.lang.Integer>getRating()SearchHitgetSearchHit()inthashCode()static RatedSearchHitparse(XContentParser parser)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
RatedSearchHit
public RatedSearchHit(SearchHit searchHit, java.util.Optional<java.lang.Integer> rating)
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
-
getSearchHit
public SearchHit getSearchHit()
-
getRating
public java.util.Optional<java.lang.Integer> getRating()
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
parse
public static RatedSearchHit parse(XContentParser parser) throws java.io.IOException
- 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
-
-