Class KnnSearchQuery
java.lang.Object
co.elastic.clients.elasticsearch.core.knn_search.KnnSearchQuery
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<KnnSearchQuery>Json deserializer forKnnSearchQuery -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringfield()Required - The name of the vector field to search againstfinal longk()Required - The final number of nearest neighbors to return as top hitsfinal longRequired - The number of nearest neighbor candidates to consider per shardstatic KnnSearchQueryRequired - The query vectorvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()
-
Field Details
-
_DESERIALIZER
Json deserializer forKnnSearchQuery
-
-
Method Details
-
of
-
field
Required - The name of the vector field to search againstAPI name:
field -
queryVector
Required - The query vectorAPI name:
query_vector -
k
public final long k()Required - The final number of nearest neighbors to return as top hitsAPI name:
k -
numCandidates
public final long numCandidates()Required - The number of nearest neighbor candidates to consider per shardAPI name:
num_candidates -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupKnnSearchQueryDeserializer
protected static void setupKnnSearchQueryDeserializer(ObjectDeserializer<KnnSearchQuery.Builder> op)
-