Class CountRequest.Builder
- All Implemented Interfaces:
WithJson<CountRequest.Builder>,ObjectBuilder<CountRequest>
- Enclosing class:
- CountRequest
CountRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal CountRequest.BuilderallowNoIndices(Boolean value) A setting that does two separate checks on the index expression.final CountRequest.BuilderThe analyzer to use for the query string.final CountRequest.BuilderanalyzeWildcard(Boolean value) Iftrue, wildcard and prefix queries are analyzed.build()Builds aCountRequest.final CountRequest.BuilderdefaultOperator(Operator value) The default operator for query string query:andoror.final CountRequest.BuilderThe field to use as a default when no field prefix is given in the query string.final CountRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values) The type of index that wildcard patterns can match.final CountRequest.BuilderexpandWildcards(List<ExpandWildcard> list) The type of index that wildcard patterns can match.final CountRequest.BuilderignoreThrottled(Boolean value) Deprecated.7.16.0final CountRequest.BuilderignoreUnavailable(Boolean value) Iffalse, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable.final CountRequest.BuilderA comma-separated list of data streams, indices, and aliases to search.final CountRequest.BuilderA comma-separated list of data streams, indices, and aliases to search.final CountRequest.BuilderIftrue, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.final CountRequest.BuilderThe minimum_scorevalue that documents must have to be included in the result.final CountRequest.Builderpreference(String value) The node or shard the operation should be performed on.final CountRequest.BuilderprojectRouting(String value) Specifies a subset of projects to target using project metadata tags in a subset of Lucene query syntax.final CountRequest.BuilderThe query in Lucene query string syntax.final CountRequest.BuilderDefines the search query using Query DSL.final CountRequest.Builderquery(QueryVariant value) Defines the search query using Query DSL.final CountRequest.BuilderDefines the search query using Query DSL.final CountRequest.BuilderrouteSlice(String value) The slice identifier used to route the operation to a specific slice.final CountRequest.BuilderA custom value used to route operations to a specific shard.final CountRequest.BuilderA custom value used to route operations to a specific shard.protected CountRequest.Builderself()final CountRequest.BuilderSpecifictagof the request for logging and statistical purposes.final CountRequest.BuilderSpecifictagof the request for logging and statistical purposes.final CountRequest.BuilderterminateAfter(Long value) The maximum number of documents to collect for each shard.Methods 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
-
allowNoIndices
A setting that does two separate checks on the index expression. Iffalse, the request returns an error (1) if any wildcard expression (including_alland*) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. Iftrue, index expressions that resolve to no indices are allowed and the request returns an empty result.API name:
allow_no_indices -
analyzeWildcard
Iftrue, wildcard and prefix queries are analyzed. This parameter can be used only when theqquery string parameter is specified.API name:
analyze_wildcard -
analyzer
The analyzer to use for the query string. This parameter can be used only when theqquery string parameter is specified.API name:
analyzer -
defaultOperator
The default operator for query string query:andoror. This parameter can be used only when theqquery 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 theqquery 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_wildcardsAdds all elements of
listtoexpandWildcards. -
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_wildcardsAdds 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:
indexAdds all elements of
listtoindex. -
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:
indexAdds 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 theqquery string parameter is specified.API name:
lenient -
minScore
The minimum_scorevalue 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 -
projectRouting
Specifies a subset of projects to target using project metadata tags in a subset of Lucene query syntax. Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project _alias:_origin _alias:pr Supported in serverless only.API name:
project_routing -
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 theqquery string parameter.API name:
query -
query
Defines the search query using Query DSL. A request body query cannot be used with theqquery string parameter.API name:
query -
query
Defines the search query using Query DSL. A request body query cannot be used with theqquery string parameter.API name:
query -
routeSlice
The slice identifier used to route the operation to a specific slice. Use the special value_allto target all slices without restricting to a routing value. Required whenindex.slice.enabledistruefor the target index; not allowed whenindex.slice.enabledisfalse.API name:
_slice -
routing
A custom value used to route operations to a specific shard. Not allowed whenindex.slice.enabledistruefor the target index; use_sliceinstead.API name:
routingAdds all elements of
listtorouting. -
routing
A custom value used to route operations to a specific shard. Not allowed whenindex.slice.enabledistruefor the target index; use_sliceinstead.API name:
routingAdds one or more values to
routing. -
stats
Specifictagof the request for logging and statistical purposes.API name:
statsAdds all elements of
listtostats. -
stats
Specifictagof the request for logging and statistical purposes.API name:
statsAdds one or more values to
stats. -
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:
selfin classRequestBase.AbstractBuilder<CountRequest.Builder>
-
build
Builds aCountRequest.- Specified by:
buildin interfaceObjectBuilder<CountRequest>- Throws:
NullPointerException- if some of the required fields are null.
-