Class KnnRetriever
java.lang.Object
co.elastic.clients.elasticsearch._types.RetrieverBase
co.elastic.clients.elasticsearch._types.KnnRetriever
- All Implemented Interfaces:
RetrieverVariant,JsonpSerializable
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RetrieverBase
RetrieverBase.AbstractBuilder<BuilderT extends RetrieverBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<KnnRetriever>Json deserializer forKnnRetriever -
Method Summary
Modifier and TypeMethodDescriptionRetriever variant kind.final Stringfield()Required - The name of the vector field to search against.final intk()Required - Number of nearest neighbors to return as top hits.final intRequired - Number of nearest neighbor candidates to consider per shard.static KnnRetrieverQuery vector.final QueryVectorBuilderDefines a model to build a query vector.final RescoreVectorApply oversampling and rescoring to quantized vectors *protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal FloatThe minimum similarity required for a document to be considered a match.Methods inherited from class co.elastic.clients.elasticsearch._types.RetrieverBase
filter, minScore, name, serialize, setupRetrieverBaseDeserializer, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface co.elastic.clients.elasticsearch._types.RetrieverVariant
_toRetriever
-
Field Details
-
_DESERIALIZER
Json deserializer forKnnRetriever
-
-
Method Details
-
of
-
_retrieverKind
Retriever variant kind.- Specified by:
_retrieverKindin interfaceRetrieverVariant
-
field
Required - The name of the vector field to search against.API name:
field -
queryVector
Query vector. Must have the same number of dimensions as the vector field you are searching against. You must provide a query_vector_builder or query_vector, but not both.API name:
query_vector -
queryVectorBuilder
Defines a model to build a query vector.API name:
query_vector_builder -
k
public final int k()Required - Number of nearest neighbors to return as top hits.API name:
k -
numCandidates
public final int numCandidates()Required - Number of nearest neighbor candidates to consider per shard.API name:
num_candidates -
similarity
The minimum similarity required for a document to be considered a match.API name:
similarity -
rescoreVector
Apply oversampling and rescoring to quantized vectors *API name:
rescore_vector -
serializeInternal
- Overrides:
serializeInternalin classRetrieverBase
-
setupKnnRetrieverDeserializer
-