Package org.opensearch.index.rankeval
Class RatedDocument
- java.lang.Object
-
- org.opensearch.index.rankeval.RatedDocument
-
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
public class RatedDocument extends java.lang.Object implements Writeable, ToXContentObject
Represents a document (specified by its _index/_id) and its corresponding rating with respect to a specific search query.The json structure of this element in a request:
{ "_index": "my_index", "_id": "doc1", "rating": 0 }
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested 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
-
Fields inherited from interface org.opensearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description RatedDocument(java.lang.String index, java.lang.String id, int rating)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetDocID()java.lang.StringgetIndex()org.opensearch.index.rankeval.RatedDocument.DocumentKeygetKey()intgetRating()inthashCode()java.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opensearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Method Detail
-
getKey
public org.opensearch.index.rankeval.RatedDocument.DocumentKey getKey()
-
getIndex
public java.lang.String getIndex()
-
getDocID
public java.lang.String getDocID()
-
getRating
public int getRating()
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-