Class MsearchRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<MsearchRequest>
- Enclosing class:
MsearchRequest
MsearchRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal MsearchRequest.BuilderallowNoIndices(Boolean value) If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices.build()Builds aMsearchRequest.final MsearchRequest.BuilderThe time after which the search request will be canceled.final MsearchRequest.BuildercancelAfterTimeInterval(Time value) The time after which the search request will be canceled.final MsearchRequest.BuilderccsMinimizeRoundtrips(Boolean value) If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.final MsearchRequest.BuilderexpandWildcards(List<ExpandWildcard> list) Type of index that wildcard expressions can match.final MsearchRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values) Type of index that wildcard expressions can match.final MsearchRequest.BuilderignoreThrottled(Boolean value) If true, concrete, expanded or aliased indices are ignored when frozen.final MsearchRequest.BuilderignoreUnavailable(Boolean value) If true, missing or closed indices are not included in the response.final MsearchRequest.BuilderComma-separated list of data streams, indices, and index aliases to search.final MsearchRequest.BuilderComma-separated list of data streams, indices, and index aliases to search.final MsearchRequest.BuildermaxConcurrentSearches(Long value) Maximum number of concurrent searches the multi search API can execute.final MsearchRequest.BuildermaxConcurrentShardRequests(Long value) Maximum number of concurrent shard requests that each sub-search request executes per node.final MsearchRequest.BuilderpreFilterShardSize(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.final MsearchRequest.BuilderRequired - Request body.final MsearchRequest.Buildersearches(List<RequestItem> list) Required - Request body.final MsearchRequest.Buildersearches(RequestItem value, RequestItem... values) Required - Request body.final MsearchRequest.BuildersearchType(SearchType value) Indicates whether global term and document frequencies should be used when scoring returned documents.Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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 -
cancelAfterTimeInterval
The time after which the search request will be canceled. Request-level parameter takes precedence over cancel_after_time_interval cluster setting.API name:
cancel_after_time_interval -
cancelAfterTimeInterval
public final MsearchRequest.Builder cancelAfterTimeInterval(Function<Time.Builder, ObjectBuilder<Time>> fn) The time after which the search request will be canceled. Request-level parameter takes precedence over cancel_after_time_interval cluster setting.API name:
cancel_after_time_interval -
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
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_wildcardsAdds all elements of
listtoexpandWildcards. -
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_wildcardsAdds one or more values to
expandWildcards. -
ignoreThrottled
If true, concrete, expanded or aliased indices are ignored when frozen.API name:
ignore_throttled -
index
Comma-separated list of data streams, indices, and index aliases to search.API name:
indexAdds all elements of
listtoindex. -
index
Comma-separated list of data streams, indices, and index aliases to search.API name:
indexAdds one or more values to
index. -
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 -
searches
Required - Request body.API name:
_value_bodyAdds all elements of
listtosearches. -
searches
Required - Request body.API name:
_value_bodyAdds one or more values to
searches. -
searches
public final MsearchRequest.Builder searches(Function<RequestItem.Builder, ObjectBuilder<RequestItem>> fn) Required - Request body.API name:
_value_bodyAdds a value to
searchesusing a builder lambda. -
build
Builds aMsearchRequest.- Specified by:
buildin interfaceObjectBuilder<MsearchRequest>- Throws:
NullPointerException- if some of the required fields are null.
-