Package org.elasticsearch.action.search
Class MultiSearchRequestBuilder
java.lang.Object
org.elasticsearch.action.ActionRequestBuilder<MultiSearchRequest,MultiSearchResponse>
org.elasticsearch.action.search.MultiSearchRequestBuilder
public class MultiSearchRequestBuilder
extends ActionRequestBuilder<MultiSearchRequest,MultiSearchResponse>
A request builder for multiple search requests.
-
Field Summary
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
Constructor Summary
ConstructorDescriptionMultiSearchRequestBuilder
(ElasticsearchClient client, MultiSearchAction action) -
Method Summary
Modifier and TypeMethodDescriptionadd
(SearchRequest request) Add a search request to execute.add
(SearchRequestBuilder request) Add a search request to execute.setIndicesOptions
(IndicesOptions indicesOptions) Specifies what type of requested indices to ignore and how to deal with wildcard indices expressions.setMaxConcurrentSearchRequests
(int maxConcurrentSearchRequests) Sets how many search requests specified in this multi search requests are allowed to be ran concurrently.
-
Constructor Details
-
MultiSearchRequestBuilder
-
-
Method Details
-
add
Add a search request to execute. Note, the order is important, the search response will be returned in the same order as the search requests.If ignoreIndices has been set on the search request, then the indicesOptions of the multi search request will not be used (if set).
-
add
Add a search request to execute. Note, the order is important, the search response will be returned in the same order as the search requests. -
setIndicesOptions
Specifies what type of requested indices to ignore and how to deal with wildcard indices expressions. For example indices that don't exist.Invoke this method before invoking
add(SearchRequestBuilder)
. -
setMaxConcurrentSearchRequests
Sets how many search requests specified in this multi search requests are allowed to be ran concurrently.
-