Class RankedDocument
java.lang.Object
co.elastic.clients.elasticsearch.inference.RankedDocument
- All Implemented Interfaces:
JsonpSerializable
The rerank result object representing a single ranked document id: the
original index of the document in the request score: the score of the
document relative to the query text: Optional, the text of the document, if
requested
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<RankedDocument>Json deserializer forRankedDocument -
Method Summary
Modifier and TypeMethodDescriptionfinal intindex()Required - API name:indexstatic RankedDocumentfinal floatscore()Required - API name:scorevoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Stringtext()API name:texttoString()
-
Field Details
-
_DESERIALIZER
Json deserializer forRankedDocument
-
-
Method Details
-
of
-
index
public final int index()Required - API name:index -
score
public final float score()Required - API name:score -
text
API name:text -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupRankedDocumentDeserializer
protected static void setupRankedDocumentDeserializer(ObjectDeserializer<RankedDocument.Builder> op)
-