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 Float
boost()
Boost value to apply to kNN scoresfinal String
field()
Required - The name of the vector field to search againstfilter()
Filters for the kNN search queryfinal InnerHits
If defined, each search hit will contain inner hits.final Integer
k()
The final number of nearest neighbors to return as top hitsfinal Integer
The number of nearest neighbor candidates to consider per shardstatic KnnSearch
The query vectorfinal QueryVectorBuilder
The query vector builder.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Float
The 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:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupKnnSearchDeserializer
-