Class CountRequest.Builder
- All Implemented Interfaces:
WithJson<CountRequest.Builder>
,ObjectBuilder<CountRequest>
- Enclosing class:
- CountRequest
CountRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal CountRequest.Builder
allowNoIndices
(Boolean value) Iffalse
, the request returns an error if any wildcard expression, index alias, or_all
value targets only missing or closed indices.final CountRequest.Builder
The analyzer to use for the query string.final CountRequest.Builder
analyzeWildcard
(Boolean value) Iftrue
, wildcard and prefix queries are analyzed.build()
Builds aCountRequest
.final CountRequest.Builder
defaultOperator
(Operator value) The default operator for query string query:AND
orOR
.final CountRequest.Builder
The field to use as a default when no field prefix is given in the query string.final CountRequest.Builder
expandWildcards
(ExpandWildcard value, ExpandWildcard... values) The type of index that wildcard patterns can match.final CountRequest.Builder
expandWildcards
(List<ExpandWildcard> list) The type of index that wildcard patterns can match.final CountRequest.Builder
ignoreThrottled
(Boolean value) Deprecated.7.16.0final CountRequest.Builder
ignoreUnavailable
(Boolean value) Iffalse
, the request returns an error if it targets a missing or closed index.final CountRequest.Builder
A comma-separated list of data streams, indices, and aliases to search.final CountRequest.Builder
A comma-separated list of data streams, indices, and aliases to search.final CountRequest.Builder
Iftrue
, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.final CountRequest.Builder
The minimum_score
value that documents must have to be included in the result.final CountRequest.Builder
preference
(String value) The node or shard the operation should be performed on.final CountRequest.Builder
The query in Lucene query string syntax.final CountRequest.Builder
Defines the search query using Query DSL.final CountRequest.Builder
query
(QueryVariant value) Defines the search query using Query DSL.final CountRequest.Builder
Defines the search query using Query DSL.final CountRequest.Builder
A custom value used to route operations to a specific shard.protected CountRequest.Builder
self()
final CountRequest.Builder
terminateAfter
(Long value) The maximum number of documents to collect for each shard.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()
-
-
Method Details
-
allowNoIndices
Iffalse
, the request returns an error if any wildcard expression, index alias, or_all
value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*
returns an error if an index starts withfoo
but no index starts withbar
.API name:
allow_no_indices
-
analyzeWildcard
Iftrue
, wildcard and prefix queries are analyzed. This parameter can be used only when theq
query string parameter is specified.API name:
analyze_wildcard
-
analyzer
The analyzer to use for the query string. This parameter can be used only when theq
query string parameter is specified.API name:
analyzer
-
defaultOperator
The default operator for query string query:AND
orOR
. This parameter can be used only when theq
query string parameter is specified.API name:
default_operator
-
df
The field to use as a default when no field prefix is given in the query string. This parameter can be used only when theq
query string parameter is specified.API name:
df
-
expandWildcards
The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. It supports comma-separated values, such asopen,hidden
.API name:
expand_wildcards
Adds all elements of
list
toexpandWildcards
. -
expandWildcards
The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. It supports comma-separated values, such asopen,hidden
.API name:
expand_wildcards
Adds one or more values to
expandWildcards
. -
ignoreThrottled
Deprecated.7.16.0Iftrue
, concrete, expanded, or aliased indices are ignored when frozen.API name:
ignore_throttled
-
index
A comma-separated list of data streams, indices, and aliases to search. It supports wildcards (*
). To search all data streams and indices, omit this parameter or use*
or_all
.API name:
index
Adds all elements of
list
toindex
. -
index
A comma-separated list of data streams, indices, and aliases to search. It supports wildcards (*
). To search all data streams and indices, omit this parameter or use*
or_all
.API name:
index
Adds one or more values to
index
. -
lenient
Iftrue
, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can be used only when theq
query string parameter is specified.API name:
lenient
-
minScore
The minimum_score
value that documents must have to be included in the result.API name:
min_score
-
preference
The node or shard the operation should be performed on. By default, it is random.API name:
preference
-
q
The query in Lucene query string syntax. This parameter cannot be used with a request body.API name:
q
-
query
Defines the search query using Query DSL. A request body query cannot be used with theq
query string parameter.API name:
query
-
query
Defines the search query using Query DSL. A request body query cannot be used with theq
query string parameter.API name:
query
-
query
Defines the search query using Query DSL. A request body query cannot be used with theq
query string parameter.API name:
query
-
routing
A custom value used to route operations to a specific shard.API name:
routing
-
terminateAfter
The maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting.IMPORTANT: Use with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
API name:
terminate_after
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<CountRequest.Builder>
-
build
Builds aCountRequest
.- Specified by:
build
in interfaceObjectBuilder<CountRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-