Class KnnSearchResponse<TDocument>
java.lang.Object
co.elastic.clients.elasticsearch.core.KnnSearchResponse<TDocument>
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class KnnSearchResponse<TDocument>
extends Object
implements JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<KnnSearchResponse<Object>>Json deserializer forKnnSearchResponsebased on named deserializers provided by the callingJsonMapper. -
Method Summary
Modifier and TypeMethodDescriptionstatic <TDocument>
JsonpDeserializer<KnnSearchResponse<TDocument>>createKnnSearchResponseDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer) Create a JSON deserializer for KnnSearchResponsefields()The field values for the documents.final HitsMetadata<TDocument>hits()Required - The returned documents and metadata.final DoublemaxScore()The highest returned document score.static <TDocument>
KnnSearchResponse<TDocument>of(Function<KnnSearchResponse.Builder<TDocument>, ObjectBuilder<KnnSearchResponse<TDocument>>> fn) voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static <TDocument>
voidsetupKnnSearchResponseDeserializer(ObjectDeserializer<KnnSearchResponse.Builder<TDocument>> op, JsonpDeserializer<TDocument> tDocumentDeserializer) final ShardStatisticsshards()Required - A count of shards used for the request.final booleantimedOut()Required - If true, the request timed out before completion; returned results may be partial or empty.final longtook()Required - The milliseconds it took Elasticsearch to run the request.toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forKnnSearchResponsebased on named deserializers provided by the callingJsonMapper.
-
-
Method Details
-
of
public static <TDocument> KnnSearchResponse<TDocument> of(Function<KnnSearchResponse.Builder<TDocument>, ObjectBuilder<KnnSearchResponse<TDocument>>> fn) -
took
public final long took()Required - The milliseconds it took Elasticsearch to run the request.API name:
took -
timedOut
public final boolean timedOut()Required - If true, the request timed out before completion; returned results may be partial or empty.API name:
timed_out -
shards
Required - A count of shards used for the request.API name:
_shards -
hits
Required - The returned documents and metadata.API name:
hits -
fields
The field values for the documents. These fields must be specified in the request using thefieldsparameter.API name:
fields -
maxScore
The highest returned document score. This value is null for requests that do not sort by score.API name:
max_score -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
createKnnSearchResponseDeserializer
public static <TDocument> JsonpDeserializer<KnnSearchResponse<TDocument>> createKnnSearchResponseDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer) Create a JSON deserializer for KnnSearchResponse -
setupKnnSearchResponseDeserializer
protected static <TDocument> void setupKnnSearchResponseDeserializer(ObjectDeserializer<KnnSearchResponse.Builder<TDocument>> op, JsonpDeserializer<TDocument> tDocumentDeserializer)
-