Package org.elasticsearch.action.search
Class MultiSearchRequest
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,TaskAwareRequest
public class MultiSearchRequest extends ActionRequest implements CompositeIndicesRequest
A multi search API request.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description static intMAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT -
Constructor Summary
Constructors Constructor Description MultiSearchRequest()MultiSearchRequest(StreamInput in) -
Method Summary
Modifier and Type Method Description MultiSearchRequestadd(SearchRequest request)Add a search request to execute.MultiSearchRequestadd(SearchRequestBuilder request)Add a search request to execute.booleanequals(java.lang.Object o)inthashCode()IndicesOptionsindicesOptions()MultiSearchRequestindicesOptions(IndicesOptions indicesOptions)intmaxConcurrentSearchRequests()Returns the amount of search requests specified in this multi search requests are allowed to be ran concurrently.MultiSearchRequestmaxConcurrentSearchRequests(int maxConcurrentSearchRequests)Sets how many search requests specified in this multi search requests are allowed to be ran concurrently.static voidreadMultiLineFormat(BytesReference data, org.elasticsearch.common.xcontent.XContent xContent, CheckedBiConsumer<SearchRequest,org.elasticsearch.common.xcontent.XContentParser,java.io.IOException> consumer, java.lang.String[] indices, IndicesOptions indicesOptions, java.lang.String[] types, java.lang.String routing, java.lang.String searchType, java.lang.Boolean ccsMinimizeRoundtrips, org.elasticsearch.common.xcontent.NamedXContentRegistry registry, boolean allowExplicitIndex, DeprecationLogger deprecationLogger)java.util.List<SearchRequest>requests()ActionRequestValidationExceptionvalidate()static byte[]writeMultiLineFormat(MultiSearchRequest multiSearchRequest, org.elasticsearch.common.xcontent.XContent xContent)static voidwriteSearchRequestParams(SearchRequest request, org.elasticsearch.common.xcontent.XContentBuilder xContentBuilder)voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddressMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT
public static final int MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT- See Also:
- Constant Field Values
-
-
Constructor Details
-
MultiSearchRequest
public MultiSearchRequest() -
MultiSearchRequest
- Throws:
java.io.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:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
readMultiLineFormat
public static void readMultiLineFormat(BytesReference data, org.elasticsearch.common.xcontent.XContent xContent, CheckedBiConsumer<SearchRequest,org.elasticsearch.common.xcontent.XContentParser,java.io.IOException> consumer, java.lang.String[] indices, IndicesOptions indicesOptions, java.lang.String[] types, java.lang.String routing, java.lang.String searchType, java.lang.Boolean ccsMinimizeRoundtrips, org.elasticsearch.common.xcontent.NamedXContentRegistry registry, boolean allowExplicitIndex, DeprecationLogger deprecationLogger) throws java.io.IOException- Throws:
java.io.IOException
-
writeMultiLineFormat
public static byte[] writeMultiLineFormat(MultiSearchRequest multiSearchRequest, org.elasticsearch.common.xcontent.XContent xContent) throws java.io.IOException- Throws:
java.io.IOException
-
writeSearchRequestParams
public static void writeSearchRequestParams(SearchRequest request, org.elasticsearch.common.xcontent.XContentBuilder xContentBuilder) throws java.io.IOException- Throws:
java.io.IOException
-