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
-
Constructor Summary
Constructors Constructor Description MultiSearchRequestBuilder(ElasticsearchClient client, MultiSearchAction action)
-
Method Summary
Modifier and Type Method Description MultiSearchRequestBuilder
add(SearchRequest request)
Add a search request to execute.MultiSearchRequestBuilder
add(SearchRequestBuilder request)
Add a search request to execute.MultiSearchRequestBuilder
setIndicesOptions(IndicesOptions indicesOptions)
Specifies what type of requested indices to ignore and how to deal with wildcard indices expressions.MultiSearchRequestBuilder
setMaxConcurrentSearchRequests(int maxConcurrentSearchRequests)
Sets how many search requests specified in this multi search requests are allowed to be ran concurrently.
-
Constructor Details
-
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.
-