Class RatedSearchHit

java.lang.Object
org.elasticsearch.index.rankeval.RatedSearchHit
All Implemented Interfaces:
org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public class RatedSearchHit
extends java.lang.Object
implements org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.common.xcontent.ToXContentObject
Combines a SearchHit with a document rating.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

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

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

    org.elasticsearch.common.io.stream.Writeable.Reader<V extends java.lang.Object>, org.elasticsearch.common.io.stream.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​(org.elasticsearch.search.SearchHit searchHit, java.util.OptionalInt rating)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    java.util.OptionalInt getRating()  
    org.elasticsearch.search.SearchHit getSearchHit()  
    int hashCode()  
    static RatedSearchHit parse​(org.elasticsearch.common.xcontent.XContentParser parser)  
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  
    void writeTo​(org.elasticsearch.common.io.stream.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 Details

    • RatedSearchHit

      public RatedSearchHit​(org.elasticsearch.search.SearchHit searchHit, java.util.OptionalInt rating)
  • Method Details

    • writeTo

      public void writeTo​(org.elasticsearch.common.io.stream.StreamOutput out) throws java.io.IOException
      Specified by:
      writeTo in interface org.elasticsearch.common.io.stream.Writeable
      Throws:
      java.io.IOException
    • getSearchHit

      public org.elasticsearch.search.SearchHit getSearchHit()
    • getRating

      public java.util.OptionalInt getRating()
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException
    • parse

      public static RatedSearchHit parse​(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException
      Throws:
      java.io.IOException
    • equals

      public final boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class java.lang.Object