Class SparseVectorQuery.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<SparseVectorQuery.Builder>
co.elastic.clients.elasticsearch._types.query_dsl.SparseVectorQuery.Builder
- All Implemented Interfaces:
WithJson<SparseVectorQuery.Builder>,ObjectBuilder<SparseVectorQuery>
- Enclosing class:
- SparseVectorQuery
public static class SparseVectorQuery.Builder
extends QueryBase.AbstractBuilder<SparseVectorQuery.Builder>
implements ObjectBuilder<SparseVectorQuery>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Required - The name of the field that contains the token-weight pairs to be searched against.Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.pruningConfig(TokenPruningConfig value) Optional pruning configuration.Optional pruning configuration.The query text you want to use for search.queryVector(Map<String, Float> v) protected SparseVectorQuery.Builderself()Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryNameMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
field
Required - The name of the field that contains the token-weight pairs to be searched against. This field must be a mapped sparse_vector field.API name:
field -
query
The query text you want to use for search. If inference_id is specified, query must also be specified.API name:
query -
prune
Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance. If prune is true but the pruning_config is not specified, pruning will occur but default values will be used. Default: falseAPI name:
prune -
pruningConfig
Optional pruning configuration. If enabled, this will omit non-significant tokens from the query in order to improve query performance. This is only used if prune is set to true. If prune is set to true but pruning_config is not specified, default values will be used.API name:
pruning_config -
pruningConfig
public final SparseVectorQuery.Builder pruningConfig(Function<TokenPruningConfig.Builder, ObjectBuilder<TokenPruningConfig>> fn) Optional pruning configuration. If enabled, this will omit non-significant tokens from the query in order to improve query performance. This is only used if prune is set to true. If prune is set to true but pruning_config is not specified, default values will be used.API name:
pruning_config -
self
- Specified by:
selfin classQueryBase.AbstractBuilder<SparseVectorQuery.Builder>
-
queryVector
-
inferenceId
-
build
- Specified by:
buildin interfaceObjectBuilder<SparseVectorQuery>
-