org.elasticsearch.action.search
Class MultiSearchRequest

java.lang.Object
  extended by org.elasticsearch.action.search.MultiSearchRequest
All Implemented Interfaces:
ActionRequest, Streamable

public class MultiSearchRequest
extends Object
implements ActionRequest

A multi search API request.


Constructor Summary
MultiSearchRequest()
           
 
Method Summary
 MultiSearchRequest add(byte[] data, int from, int length, boolean contentUnsafe, String[] indices, String[] types, String searchType)
           
 MultiSearchRequest add(BytesReference data, boolean contentUnsafe, String[] indices, String[] types, String searchType, IgnoreIndices ignoreIndices)
           
 MultiSearchRequest add(SearchRequest request)
          Add a search request to execute.
 MultiSearchRequest add(SearchRequestBuilder request)
          Add a search request to execute.
 IgnoreIndices ignoreIndices()
           
 MultiSearchRequest ignoreIndices(IgnoreIndices ignoreIndices)
           
 boolean listenerThreaded()
          Should the response listener be executed on a thread or not.
 MultiSearchRequest listenerThreaded(boolean listenerThreaded)
          Sets if the response listener be executed on a thread or not.
 void readFrom(StreamInput in)
           
 List<SearchRequest> requests()
           
 ActionRequestValidationException validate()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiSearchRequest

public MultiSearchRequest()
Method Detail

add

public MultiSearchRequest add(SearchRequestBuilder request)
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

public MultiSearchRequest add(SearchRequest request)
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

public MultiSearchRequest add(byte[] data,
                              int from,
                              int length,
                              boolean contentUnsafe,
                              @Nullable
                              String[] indices,
                              @Nullable
                              String[] types,
                              @Nullable
                              String searchType)
                       throws Exception
Throws:
Exception

add

public MultiSearchRequest add(BytesReference data,
                              boolean contentUnsafe,
                              @Nullable
                              String[] indices,
                              @Nullable
                              String[] types,
                              @Nullable
                              String searchType,
                              IgnoreIndices ignoreIndices)
                       throws Exception
Throws:
Exception

requests

public List<SearchRequest> requests()

validate

public ActionRequestValidationException validate()
Specified by:
validate in interface ActionRequest

listenerThreaded

public boolean listenerThreaded()
Description copied from interface: ActionRequest
Should the response listener be executed on a thread or not.

When not executing on a thread, it will either be executed on the calling thread, or on an expensive, IO based, thread.

Specified by:
listenerThreaded in interface ActionRequest

listenerThreaded

public MultiSearchRequest listenerThreaded(boolean listenerThreaded)
Description copied from interface: ActionRequest
Sets if the response listener be executed on a thread or not.

Specified by:
listenerThreaded in interface ActionRequest

ignoreIndices

public IgnoreIndices ignoreIndices()

ignoreIndices

public MultiSearchRequest ignoreIndices(IgnoreIndices ignoreIndices)

readFrom

public void readFrom(StreamInput in)
              throws IOException
Specified by:
readFrom in interface Streamable
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Specified by:
writeTo in interface Streamable
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.