Class MsearchRequest
java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch._global.MsearchRequest
- All Implemented Interfaces:
ToJsonp
public final class MsearchRequest extends RequestBase implements ToJsonp
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMsearchRequest.BuilderBuilder forMsearchRequest. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<MsearchRequest>DESERIALIZERJson deserializer for MsearchRequest -
Constructor Summary
Constructors Modifier Constructor Description protectedMsearchRequest(MsearchRequest.Builder builder) -
Method Summary
Modifier and Type Method Description java.lang.BooleanallowNoIndices()If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices.java.lang.BooleanccsMinimizeRoundtrips()If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.static <TDocument>
Endpoint<MsearchRequest,MsearchResponse<TDocument>,OpenSearchError>createMsearchEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "msearch" endpoint.jakarta.json.JsonValueexpandWildcards()Type of index that wildcard expressions can match.java.lang.BooleanignoreThrottled()If true, concrete, expanded or aliased indices are ignored when frozen.java.lang.BooleanignoreUnavailable()If true, missing or closed indices are not included in the response.java.util.List<java.lang.String>index()Comma-separated list of data streams, indices, and index aliases to search.java.lang.NumbermaxConcurrentSearches()Maximum number of concurrent searches the multi search API can execute.java.lang.NumbermaxConcurrentShardRequests()Maximum number of concurrent shard requests that each sub-search request executes per node.java.lang.NumberpreFilterShardSize()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.java.lang.BooleanrestTotalHitsAsInt()If true, hits.total are returned as an integer in the response.jakarta.json.JsonValuesearchType()Indicates whether global term and document frequencies should be used when scoring returned documents.protected static voidsetupMsearchRequestDeserializer(DelegatingDeserializer<MsearchRequest.Builder> op)voidtoJsonp(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this value to JSON.java.util.List<java.lang.String>type()API name:typejava.lang.BooleantypedKeys()Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.java.util.List<jakarta.json.JsonValue>value()Request body.
-
Field Details
-
DESERIALIZER
Json deserializer for MsearchRequest
-
-
Constructor Details
-
Method Details
-
index
@Nullable public java.util.List<java.lang.String> index()Comma-separated list of data streams, indices, and index aliases to search. API name:index -
type
@Nullable public java.util.List<java.lang.String> type()API name:type -
allowNoIndices
@Nullable public java.lang.Boolean 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
@Nullable public java.lang.Boolean 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
@Nullable public jakarta.json.JsonValue 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 -
ignoreThrottled
@Nullable public java.lang.Boolean ignoreThrottled()If true, concrete, expanded or aliased indices are ignored when frozen. API name:ignore_throttled -
ignoreUnavailable
@Nullable public java.lang.Boolean ignoreUnavailable()If true, missing or closed indices are not included in the response. API name:ignore_unavailable -
maxConcurrentSearches
@Nullable public java.lang.Number maxConcurrentSearches()Maximum number of concurrent searches the multi search API can execute. API name:max_concurrent_searches -
maxConcurrentShardRequests
@Nullable public java.lang.Number maxConcurrentShardRequests()Maximum number of concurrent shard requests that each sub-search request executes per node. API name:max_concurrent_shard_requests -
preFilterShardSize
@Nullable public java.lang.Number 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
@Nullable public jakarta.json.JsonValue searchType()Indicates whether global term and document frequencies should be used when scoring returned documents. API name:search_type -
restTotalHitsAsInt
@Nullable public java.lang.Boolean restTotalHitsAsInt()If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. API name:rest_total_hits_as_int -
typedKeys
@Nullable public java.lang.Boolean typedKeys()Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. API name:typed_keys -
value
public java.util.List<jakarta.json.JsonValue> value()Request body. API name:value -
toJsonp
Serialize this value to JSON. -
setupMsearchRequestDeserializer
protected static void setupMsearchRequestDeserializer(DelegatingDeserializer<MsearchRequest.Builder> op) -
createMsearchEndpoint
public static <TDocument> Endpoint<MsearchRequest,MsearchResponse<TDocument>,OpenSearchError> createMsearchEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "msearch" endpoint.
-