Package org.elasticsearch.index.rankeval
Class RatedDocument
- java.lang.Object
-
- org.elasticsearch.index.rankeval.RatedDocument
-
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
public class RatedDocument extends 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.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>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description RatedDocument(String index, String id, int rating)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetDocID()StringgetIndex()org.elasticsearch.index.rankeval.RatedDocument.DocumentKeygetKey()intgetRating()inthashCode()StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Method Detail
-
getKey
public org.elasticsearch.index.rankeval.RatedDocument.DocumentKey getKey()
-
getIndex
public String getIndex()
-
getDocID
public String getDocID()
-
getRating
public int getRating()
-
writeTo
public void writeTo(StreamOutput out) throws IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
-