Class KnnSearch
java.lang.Object
co.elastic.clients.elasticsearch._types.KnnSearch
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<KnnSearch>Json deserializer forKnnSearch -
Method Summary
Modifier and TypeMethodDescriptionfinal Floatboost()Boost value to apply to kNN scoresfinal Stringfield()Required - The name of the vector field to search againstfilter()Filters for the kNN search queryfinal InnerHitsIf defined, each search hit will contain inner hits.final Integerk()The final number of nearest neighbors to return as top hitsfinal IntegerThe number of nearest neighbor candidates to consider per shardstatic KnnSearchThe query vectorfinal QueryVectorBuilderThe query vector builder.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal FloatThe minimum similarity for a vector to be considered a matchtoString()
-
Field Details
-
_DESERIALIZER
Json deserializer forKnnSearch
-
-
Method Details
-
of
-
field
Required - The name of the vector field to search againstAPI name:
field -
queryVector
The query vectorAPI name:
query_vector -
queryVectorBuilder
The query vector builder. You must provide a query_vector_builder or query_vector, but not both.API name:
query_vector_builder -
k
The final number of nearest neighbors to return as top hitsAPI name:
k -
numCandidates
The number of nearest neighbor candidates to consider per shardAPI name:
num_candidates -
boost
Boost value to apply to kNN scoresAPI name:
boost -
filter
Filters for the kNN search queryAPI name:
filter -
similarity
The minimum similarity for a vector to be considered a matchAPI name:
similarity -
innerHits
If defined, each search hit will contain inner hits.API name:
inner_hits -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupKnnSearchDeserializer
-