Class KnnSearchRequest.Builder
- All Implemented Interfaces:
WithJson<KnnSearchRequest.Builder>
,ObjectBuilder<KnnSearchRequest>
- Enclosing class:
- KnnSearchRequest
KnnSearchRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Deprecated.Builds aKnnSearchRequest
.final KnnSearchRequest.Builder
docvalueFields
(FieldAndFormat value, FieldAndFormat... values) Deprecated.The request returns doc values for field names matching these patterns in thehits.fields
property of the response.final KnnSearchRequest.Builder
Deprecated.The request returns doc values for field names matching these patterns in thehits.fields
property of the response.final KnnSearchRequest.Builder
docvalueFields
(List<FieldAndFormat> list) Deprecated.The request returns doc values for field names matching these patterns in thehits.fields
property of the response.final KnnSearchRequest.Builder
Deprecated.The request returns values for field names matching these patterns in thehits.fields
property of the response.final KnnSearchRequest.Builder
Deprecated.The request returns values for field names matching these patterns in thehits.fields
property of the response.final KnnSearchRequest.Builder
Deprecated.A query to filter the documents that can match.final KnnSearchRequest.Builder
filter
(QueryVariant value, QueryVariant... values) Deprecated.A query to filter the documents that can match.final KnnSearchRequest.Builder
Deprecated.A query to filter the documents that can match.final KnnSearchRequest.Builder
Deprecated.A query to filter the documents that can match.final KnnSearchRequest.Builder
Deprecated.Required - A comma-separated list of index names to search; use_all
or to perform the operation on all indices.final KnnSearchRequest.Builder
Deprecated.Required - A comma-separated list of index names to search; use_all
or to perform the operation on all indices.final KnnSearchRequest.Builder
knn
(KnnSearchQuery value) Deprecated.Required - The kNN query to run.final KnnSearchRequest.Builder
Deprecated.Required - The kNN query to run.final KnnSearchRequest.Builder
Deprecated.A comma-separated list of specific routing values.protected KnnSearchRequest.Builder
self()
Deprecated.final KnnSearchRequest.Builder
source
(SourceConfig value) Deprecated.Indicates which source fields are returned for matching documents.final KnnSearchRequest.Builder
Deprecated.Indicates which source fields are returned for matching documents.final KnnSearchRequest.Builder
storedFields
(String value, String... values) Deprecated.A list of stored fields to return as part of a hit.final KnnSearchRequest.Builder
storedFields
(List<String> list) Deprecated.A list of stored fields to return as part of a hit.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()Deprecated.
-
-
Method Details
-
source
Deprecated.Indicates which source fields are returned for matching documents. These fields are returned in thehits._source
property of the search response.API name:
_source
-
source
public final KnnSearchRequest.Builder source(Function<SourceConfig.Builder, ObjectBuilder<SourceConfig>> fn) Deprecated.Indicates which source fields are returned for matching documents. These fields are returned in thehits._source
property of the search response.API name:
_source
-
docvalueFields
Deprecated.The request returns doc values for field names matching these patterns in thehits.fields
property of the response. It accepts wildcard (*
) patterns.API name:
docvalue_fields
Adds all elements of
list
todocvalueFields
. -
docvalueFields
public final KnnSearchRequest.Builder docvalueFields(FieldAndFormat value, FieldAndFormat... values) Deprecated.The request returns doc values for field names matching these patterns in thehits.fields
property of the response. It accepts wildcard (*
) patterns.API name:
docvalue_fields
Adds one or more values to
docvalueFields
. -
docvalueFields
public final KnnSearchRequest.Builder docvalueFields(Function<FieldAndFormat.Builder, ObjectBuilder<FieldAndFormat>> fn) Deprecated.The request returns doc values for field names matching these patterns in thehits.fields
property of the response. It accepts wildcard (*
) patterns.API name:
docvalue_fields
Adds a value to
docvalueFields
using a builder lambda. -
fields
Deprecated.The request returns values for field names matching these patterns in thehits.fields
property of the response. It accepts wildcard (*
) patterns.API name:
fields
Adds all elements of
list
tofields
. -
fields
Deprecated.The request returns values for field names matching these patterns in thehits.fields
property of the response. It accepts wildcard (*
) patterns.API name:
fields
Adds one or more values to
fields
. -
filter
Deprecated.A query to filter the documents that can match. The kNN search will return the topk
documents that also match this filter. The value can be a single query or a list of queries. Iffilter
isn't provided, all documents are allowed to match.API name:
filter
Adds all elements of
list
tofilter
. -
filter
Deprecated.A query to filter the documents that can match. The kNN search will return the topk
documents that also match this filter. The value can be a single query or a list of queries. Iffilter
isn't provided, all documents are allowed to match.API name:
filter
Adds one or more values to
filter
. -
filter
Deprecated.A query to filter the documents that can match. The kNN search will return the topk
documents that also match this filter. The value can be a single query or a list of queries. Iffilter
isn't provided, all documents are allowed to match.API name:
filter
Adds one or more values to
filter
. -
filter
Deprecated.A query to filter the documents that can match. The kNN search will return the topk
documents that also match this filter. The value can be a single query or a list of queries. Iffilter
isn't provided, all documents are allowed to match.API name:
filter
Adds a value to
filter
using a builder lambda. -
index
Deprecated.Required - A comma-separated list of index names to search; use_all
or to perform the operation on all indices.API name:
index
Adds all elements of
list
toindex
. -
index
Deprecated.Required - A comma-separated list of index names to search; use_all
or to perform the operation on all indices.API name:
index
Adds one or more values to
index
. -
knn
Deprecated.Required - The kNN query to run.API name:
knn
-
knn
public final KnnSearchRequest.Builder knn(Function<KnnSearchQuery.Builder, ObjectBuilder<KnnSearchQuery>> fn) Deprecated.Required - The kNN query to run.API name:
knn
-
routing
Deprecated.A comma-separated list of specific routing values.API name:
routing
-
storedFields
Deprecated.A list of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the_source
parameter defaults tofalse
. You can pass_source: true
to return both source fields and stored fields in the search response.API name:
stored_fields
Adds all elements of
list
tostoredFields
. -
storedFields
Deprecated.A list of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the_source
parameter defaults tofalse
. You can pass_source: true
to return both source fields and stored fields in the search response.API name:
stored_fields
Adds one or more values to
storedFields
. -
self
Deprecated.- Specified by:
self
in classRequestBase.AbstractBuilder<KnnSearchRequest.Builder>
-
build
Deprecated.Builds aKnnSearchRequest
.- Specified by:
build
in interfaceObjectBuilder<KnnSearchRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-