Class MsearchRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch._core.MsearchRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<MsearchRequest>
- Enclosing class:
- MsearchRequest
public static class MsearchRequest.Builder extends java.lang.Object implements ObjectBuilder<MsearchRequest>
Builder for
MsearchRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description MsearchRequest.Builder
addExpandWildcards(ExpandWildcardOptions value)
Add a value toexpandWildcards(List)
, creating the list if needed.MsearchRequest.Builder
addIndex(java.lang.String value)
Add a value toindex(List)
, creating the list if needed.MsearchRequest.Builder
addSearches(jakarta.json.JsonValue value)
Add a value tosearches(List)
, creating the list if needed.MsearchRequest.Builder
addType(java.lang.String value)
Add a value totype(List)
, creating the list if needed.MsearchRequest.Builder
allowNoIndices(java.lang.Boolean value)
If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices.MsearchRequest
build()
Builds aMsearchRequest
.MsearchRequest.Builder
ccsMinimizeRoundtrips(java.lang.Boolean value)
If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.MsearchRequest.Builder
expandWildcards(ExpandWildcardOptions... value)
Type of index that wildcard expressions can match.MsearchRequest.Builder
expandWildcards(java.util.List<ExpandWildcardOptions> value)
Type of index that wildcard expressions can match.MsearchRequest.Builder
ignoreThrottled(java.lang.Boolean value)
If true, concrete, expanded or aliased indices are ignored when frozen.MsearchRequest.Builder
ignoreUnavailable(java.lang.Boolean value)
If true, missing or closed indices are not included in the response.MsearchRequest.Builder
index(java.lang.String... value)
Comma-separated list of data streams, indices, and index aliases to search.MsearchRequest.Builder
index(java.util.List<java.lang.String> value)
Comma-separated list of data streams, indices, and index aliases to search.MsearchRequest.Builder
maxConcurrentSearches(java.lang.Long value)
Maximum number of concurrent searches the multi search API can execute.MsearchRequest.Builder
maxConcurrentShardRequests(java.lang.Long value)
Maximum number of concurrent shard requests that each sub-search request executes per node.MsearchRequest.Builder
preFilterShardSize(java.lang.Long value)
Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold.MsearchRequest.Builder
searches(jakarta.json.JsonValue... value)
Required - Request body.MsearchRequest.Builder
searches(java.util.List<jakarta.json.JsonValue> value)
Required - Request body.MsearchRequest.Builder
searchType(SearchType value)
Indicates whether global term and document frequencies should be used when scoring returned documents.MsearchRequest.Builder
type(java.lang.String... value)
A comma-separated list of document types to use as defaultMsearchRequest.Builder
type(java.util.List<java.lang.String> value)
A comma-separated list of document types to use as defaultMsearchRequest.Builder
typedKeys(java.lang.Boolean value)
Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
index
Comma-separated list of data streams, indices, and index aliases to search.API name:
index
-
index
Comma-separated list of data streams, indices, and index aliases to search.API name:
index
-
addIndex
Add a value toindex(List)
, creating the list if needed. -
type
A comma-separated list of document types to use as defaultAPI name:
type
-
type
A comma-separated list of document types to use as defaultAPI name:
type
-
addType
Add a value totype(List)
, creating the list if needed. -
allowNoIndices
If false, 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 targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.API name:
allow_no_indices
-
ccsMinimizeRoundtrips
If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.API name:
ccs_minimize_roundtrips
-
expandWildcards
public MsearchRequest.Builder expandWildcards(@Nullable java.util.List<ExpandWildcardOptions> value)Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.API name:
expand_wildcards
-
expandWildcards
Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.API name:
expand_wildcards
-
addExpandWildcards
Add a value toexpandWildcards(List)
, creating the list if needed. -
ignoreThrottled
If true, concrete, expanded or aliased indices are ignored when frozen.API name:
ignore_throttled
-
maxConcurrentSearches
Maximum number of concurrent searches the multi search API can execute.API name:
max_concurrent_searches
-
maxConcurrentShardRequests
Maximum number of concurrent shard requests that each sub-search request executes per node.API name:
max_concurrent_shard_requests
-
preFilterShardSize
Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.API name:
pre_filter_shard_size
-
searchType
Indicates whether global term and document frequencies should be used when scoring returned documents.API name:
search_type
-
typedKeys
Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.API name:
typed_keys
-
searches
Required - Request body.API name:
_value_body
-
searches
Required - Request body.API name:
_value_body
-
addSearches
Add a value tosearches(List)
, creating the list if needed. -
build
Builds aMsearchRequest
.- Specified by:
build
in interfaceObjectBuilder<MsearchRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-