org.elasticsearch.action.get
Class MultiGetRequest
java.lang.Object
org.elasticsearch.action.get.MultiGetRequest
- All Implemented Interfaces:
- ActionRequest, Streamable
public class MultiGetRequest
- extends java.lang.Object
- implements ActionRequest
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiGetRequest
public MultiGetRequest()
add
public MultiGetRequest add(MultiGetRequest.Item item)
add
public MultiGetRequest add(java.lang.String index,
@Nullable
java.lang.String type,
java.lang.String id)
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 MultiGetRequest 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
validate
public ActionRequestValidationException validate()
- Specified by:
validate
in interface ActionRequest
preference
public MultiGetRequest preference(java.lang.String preference)
- Sets the preference to execute the search. Defaults to randomize across shards. Can be set to
_local to prefer local shards, _primary to execute only on primary shards, or
a custom value, which guarantees that the same order will be used across different requests.
preference
public java.lang.String preference()
realtime
public boolean realtime()
realtime
public MultiGetRequest realtime(java.lang.Boolean realtime)
refresh
public boolean refresh()
refresh
public MultiGetRequest refresh(boolean refresh)
add
public void add(@Nullable
java.lang.String defaultIndex,
@Nullable
java.lang.String defaultType,
@Nullable
java.lang.String[] defaultFields,
byte[] data,
int from,
int length)
throws java.lang.Exception
- Throws:
java.lang.Exception
readFrom
public void readFrom(StreamInput in)
throws java.io.IOException
- Specified by:
readFrom
in interface Streamable
- Throws:
java.io.IOException
writeTo
public void writeTo(StreamOutput out)
throws java.io.IOException
- Specified by:
writeTo
in interface Streamable
- Throws:
java.io.IOException