Class DiscountedCumulativeGain.Detail

java.lang.Object
org.elasticsearch.index.rankeval.DiscountedCumulativeGain.Detail
All Implemented Interfaces:
org.elasticsearch.common.io.stream.NamedWriteable, org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, MetricDetail
Enclosing class:
DiscountedCumulativeGain

public static final class DiscountedCumulativeGain.Detail extends Object implements MetricDetail
  • 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 Object>, org.elasticsearch.common.io.stream.Writeable.Writer<V extends Object>
  • Field Summary

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object obj)
     
    fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
     
    double
     
    double
     
     
    double
     
     
     
    int
     
    org.elasticsearch.common.xcontent.XContentBuilder
    innerToXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
    Implementations should write their own fields to the XContentBuilder passed in.
    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.index.rankeval.MetricDetail

    toXContent

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject

    isFragment
  • Method Details

    • getMetricName

      public String getMetricName()
      Specified by:
      getMetricName in interface MetricDetail
    • innerToXContent

      public org.elasticsearch.common.xcontent.XContentBuilder innerToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Description copied from interface: MetricDetail
      Implementations should write their own fields to the XContentBuilder passed in.
      Specified by:
      innerToXContent in interface MetricDetail
      Throws:
      IOException
    • fromXContent

      public static DiscountedCumulativeGain.Detail fromXContent(org.elasticsearch.common.xcontent.XContentParser parser)
    • writeTo

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

      public String getWriteableName()
      Specified by:
      getWriteableName in interface org.elasticsearch.common.io.stream.NamedWriteable
    • getDCG

      public double getDCG()
      Returns:
      the discounted cumulative gain
    • getIDCG

      public double getIDCG()
      Returns:
      the ideal discounted cumulative gain, can be 0 if nothing was computed, e.g. because no normalization was required
    • getNDCG

      public double getNDCG()
      Returns:
      the normalized discounted cumulative gain, can be 0 if nothing was computed, e.g. because no normalization was required
    • getUnratedDocs

      public Object getUnratedDocs()
      Returns:
      the number of unrated documents in the search results
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object