Class RatedDocument

java.lang.Object
org.elasticsearch.index.rankeval.RatedDocument
All Implemented Interfaces:
Writeable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class RatedDocument extends Object implements Writeable, org.elasticsearch.xcontent.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.xcontent.ToXContent

    org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V extends Object>, Writeable.Writer<V extends Object>
  • Field Summary

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    RatedDocument(String index, String id, int rating)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
     
     
     
    org.elasticsearch.index.rankeval.RatedDocument.DocumentKey
     
    int
     
    final int
     
     
    org.elasticsearch.xcontent.XContentBuilder
    toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
     
    void
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject

    isFragment
  • Constructor Details

    • RatedDocument

      public RatedDocument(String index, String id, int rating)
  • Method Details

    • 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
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object