Package org.elasticsearch.index.rankeval
Class DiscountedCumulativeGain.Detail
- java.lang.Object
-
- org.elasticsearch.index.rankeval.DiscountedCumulativeGain.Detail
-
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentObject,MetricDetail
- Enclosing class:
- DiscountedCumulativeGain
public static final class DiscountedCumulativeGain.Detail extends java.lang.Object implements MetricDetail
-
-
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 extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object>
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)static DiscountedCumulativeGain.DetailfromXContent(XContentParser parser)doublegetDCG()doublegetIDCG()java.lang.StringgetMetricName()doublegetNDCG()java.lang.ObjectgetUnratedDocs()java.lang.StringgetWriteableName()inthashCode()XContentBuilderinnerToXContent(XContentBuilder builder, ToXContent.Params params)Implementations should write their own fields to theXContentBuilderpassed in.voidwriteTo(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 Detail
-
getMetricName
public java.lang.String getMetricName()
- Specified by:
getMetricNamein interfaceMetricDetail
-
innerToXContent
public XContentBuilder innerToXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
Description copied from interface:MetricDetailImplementations should write their own fields to theXContentBuilderpassed in.- Specified by:
innerToXContentin interfaceMetricDetail- Throws:
java.io.IOException
-
fromXContent
public static DiscountedCumulativeGain.Detail fromXContent(XContentParser parser)
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
-
getWriteableName
public java.lang.String getWriteableName()
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
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 java.lang.Object getUnratedDocs()
- Returns:
- the number of unrated documents in the search results
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-