Class KnnQuery
java.lang.Object
org.opensearch.client.opensearch._types.query_dsl.QueryBase
org.opensearch.client.opensearch._types.query_dsl.KnnQuery
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,QueryVariant,ToCopyableBuilder<KnnQuery.Builder,KnnQuery>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class KnnQuery
extends QueryBase
implements QueryVariant, ToCopyableBuilder<KnnQuery.Builder,KnnQuery>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._types.query_dsl.QueryBase
QueryBase.AbstractBuilder<BuilderT extends QueryBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<KnnQuery> Json deserializer forKnnQuery -
Method Summary
Modifier and TypeMethodDescriptionQueryvariant kind.static KnnQuery.Builderbuilder()booleanfinal BooleanAPI name:expand_nested_docsfinal Stringfield()Required - The target fieldfinal Queryfilter()The filter for the k-NN search query.inthashCode()final Integerk()The total number of nearest neighbors to return as top hits.final FloatThe maximum physical vector space distance required in order for a neighbor to be considered a hit.API name:method_parametersfinal FloatminScore()The minimum similarity score required in order for a neighbor to be considered a hit.static KnnQueryfinal KnnQueryRescorerescore()API name:rescoreprotected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.vector()Required - API name:vectorMethods inherited from class org.opensearch.client.opensearch._types.query_dsl.QueryBase
boost, queryName, serialize, setupQueryBaseDeserializerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.opensearch._types.query_dsl.QueryVariant
toQueryMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
Field Details
-
_DESERIALIZER
Json deserializer forKnnQuery
-
-
Method Details
-
of
-
_queryKind
Queryvariant kind.- Specified by:
_queryKindin interfaceQueryVariant
-
expandNestedDocs
API name:expand_nested_docs -
field
Required - The target field -
filter
The filter for the k-NN search query.API name:
filter -
k
The total number of nearest neighbors to return as top hits.API name:
k -
maxDistance
The maximum physical vector space distance required in order for a neighbor to be considered a hit.API name:
max_distance -
methodParameters
API name:method_parameters -
minScore
The minimum similarity score required in order for a neighbor to be considered a hit.API name:
min_score -
rescore
API name:rescore -
vector
Required - API name:vector -
serializeInternal
- Overrides:
serializeInternalin classQueryBase
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<KnnQuery.Builder,KnnQuery> - Returns:
- a new builder instance.
-
builder
-
setupKnnQueryDeserializer
-
hashCode
public int hashCode() -
equals
-