org.elasticsearch.action.get
Class MultiGetRequest
java.lang.Object
org.elasticsearch.action.get.MultiGetRequest
- All Implemented Interfaces:
- ActionRequest, Streamable
public class MultiGetRequest
- extends Object
- implements ActionRequest
Method Summary |
MultiGetRequest |
add(MultiGetRequest.Item item)
|
MultiGetRequest |
add(String index,
String type,
String id)
|
void |
add(String defaultIndex,
String defaultType,
String[] defaultFields,
byte[] data,
int from,
int length)
|
void |
add(String defaultIndex,
String defaultType,
String[] defaultFields,
BytesReference data)
|
boolean |
listenerThreaded()
Should the response listener be executed on a thread or not. |
MultiGetRequest |
listenerThreaded(boolean listenerThreaded)
Sets if the response listener be executed on a thread or not. |
String |
preference()
|
MultiGetRequest |
preference(String preference)
Sets the preference to execute the search. |
void |
readFrom(StreamInput in)
|
boolean |
realtime()
|
MultiGetRequest |
realtime(Boolean realtime)
|
boolean |
refresh()
|
MultiGetRequest |
refresh(boolean refresh)
|
ActionRequestValidationException |
validate()
|
void |
writeTo(StreamOutput out)
|
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(String index,
@Nullable
String type,
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(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 String preference()
realtime
public boolean realtime()
realtime
public MultiGetRequest realtime(Boolean realtime)
refresh
public boolean refresh()
refresh
public MultiGetRequest refresh(boolean refresh)
add
public void add(@Nullable
String defaultIndex,
@Nullable
String defaultType,
@Nullable
String[] defaultFields,
byte[] data,
int from,
int length)
throws Exception
- Throws:
Exception
add
public void add(@Nullable
String defaultIndex,
@Nullable
String defaultType,
@Nullable
String[] defaultFields,
BytesReference data)
throws Exception
- Throws:
Exception
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.