java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.search.MultiSearchRequest
- All Implemented Interfaces:
CompositeIndicesRequest,Writeable,RefCounted,TaskAwareRequest
A multi search API request.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(SearchRequest request) Add a search request to execute.add(SearchRequestBuilder request) Add a search request to execute.Returns the task object that should be used to keep track of the processing of the request.booleaninthashCode()indicesOptions(IndicesOptions indicesOptions) intReturns the amount of search requests specified in this multi search requests are allowed to be ran concurrently.maxConcurrentSearchRequests(int maxConcurrentSearchRequests) Sets how many search requests specified in this multi search requests are allowed to be ran concurrently.static voidreadMultiLineFormat(XContent xContent, XContentParserConfiguration parserConfig, BytesReference data, CheckedBiConsumer<SearchRequest, XContentParser, IOException> consumer, String[] indices, IndicesOptions indicesOptions, String routing, String searchType, Boolean ccsMinimizeRoundtrips, boolean allowExplicitIndex) static voidreadMultiLineFormat(XContent xContent, XContentParserConfiguration parserConfig, BytesReference data, CheckedBiConsumer<SearchRequest, XContentParser, IOException> consumer, String[] indices, IndicesOptions indicesOptions, String routing, String searchType, Boolean ccsMinimizeRoundtrips, boolean allowExplicitIndex, TriFunction<String, Object, SearchRequest, Boolean> extraParamParser) requests()validate()static byte[]writeMultiLineFormat(MultiSearchRequest multiSearchRequest, XContent xContent) static voidwriteSearchRequestParams(SearchRequest request, XContentBuilder xContentBuilder) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
getDescription, setParentTask
-
Field Details
-
FIRST_LINE_EMPTY_DEPRECATION_MESSAGE
- See Also:
-
MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT
public static final int MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT- See Also:
-
-
Constructor Details
-
MultiSearchRequest
public MultiSearchRequest() -
MultiSearchRequest
- Throws:
IOException
-
-
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. -
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. -
maxConcurrentSearchRequests
public int maxConcurrentSearchRequests()Returns the amount of search requests specified in this multi search requests are allowed to be ran concurrently. -
maxConcurrentSearchRequests
Sets how many search requests specified in this multi search requests are allowed to be ran concurrently. -
requests
-
validate
- Specified by:
validatein classActionRequest
-
indicesOptions
-
indicesOptions
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionRequest- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
readMultiLineFormat
public static void readMultiLineFormat(XContent xContent, XContentParserConfiguration parserConfig, BytesReference data, CheckedBiConsumer<SearchRequest, XContentParser, throws IOExceptionIOException> consumer, String[] indices, IndicesOptions indicesOptions, String routing, String searchType, Boolean ccsMinimizeRoundtrips, boolean allowExplicitIndex) - Throws:
IOException
-
readMultiLineFormat
public static void readMultiLineFormat(XContent xContent, XContentParserConfiguration parserConfig, BytesReference data, CheckedBiConsumer<SearchRequest, XContentParser, throws IOExceptionIOException> consumer, String[] indices, IndicesOptions indicesOptions, String routing, String searchType, Boolean ccsMinimizeRoundtrips, boolean allowExplicitIndex, TriFunction<String, Object, SearchRequest, Boolean> extraParamParser) - Throws:
IOException
-
writeMultiLineFormat
public static byte[] writeMultiLineFormat(MultiSearchRequest multiSearchRequest, XContent xContent) throws IOException - Throws:
IOException
-
writeSearchRequestParams
public static void writeSearchRequestParams(SearchRequest request, XContentBuilder xContentBuilder) throws IOException - Throws:
IOException
-
createTask
public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String, String> headers) Description copied from interface:TaskAwareRequestReturns the task object that should be used to keep track of the processing of the request.- Specified by:
createTaskin interfaceTaskAwareRequest
-