Class SparseVectorQuery.Builder.ContainerBuilder
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.SparseVectorQuery.Builder.ContainerBuilder
- All Implemented Interfaces:
ObjectBuilder<SparseVectorQuery>
- Enclosing class:
- SparseVectorQuery.Builder
public class SparseVectorQuery.Builder.ContainerBuilder
extends Object
implements ObjectBuilder<SparseVectorQuery>
-
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.
-
Constructor Details
-
ContainerBuilder
public ContainerBuilder()
-
-
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
public final SparseVectorQuery.Builder.ContainerBuilder pruningConfig(@Nullable TokenPruningConfig value) 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.ContainerBuilder 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
-
build
- Specified by:
build
in interfaceObjectBuilder<SparseVectorQuery>
-