Package org.opensearch.index.rankeval
Class RatedDocument
java.lang.Object
org.opensearch.index.rankeval.RatedDocument
- All Implemented Interfaces:
Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentObject
public class RatedDocument
extends Object
implements Writeable, org.opensearch.core.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.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.common.io.stream.Writeable
Writeable.Reader<V extends Object>, Writeable.WriteableRegistry, Writeable.Writer<V extends Object> -
Field Summary
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleangetDocID()getIndex()org.opensearch.index.rankeval.RatedDocument.DocumentKeygetKey()intfinal inthashCode()toString()org.opensearch.core.xcontent.XContentBuildertoXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
RatedDocument
-
-
Method Details
-
getKey
public org.opensearch.index.rankeval.RatedDocument.DocumentKey getKey() -
getIndex
-
getDocID
-
getRating
public int getRating() -
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.opensearch.core.xcontent.ToXContent- Throws:
IOException
-
toString
-
equals
-
hashCode
public final int hashCode()
-