org.elasticsearch.action.get
Class MultiGetRequestBuilder
java.lang.Object
org.elasticsearch.action.support.BaseRequestBuilder<MultiGetRequest,MultiGetResponse>
org.elasticsearch.action.get.MultiGetRequestBuilder
- All Implemented Interfaces:
- ActionRequestBuilder<MultiGetRequest,MultiGetResponse>
public class MultiGetRequestBuilder
- extends BaseRequestBuilder<MultiGetRequest,MultiGetResponse>
A multi get document action request builder.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiGetRequestBuilder
public MultiGetRequestBuilder(Client client)
add
public MultiGetRequestBuilder add(String index,
@Nullable
String type,
String id)
add
public MultiGetRequestBuilder add(String index,
@Nullable
String type,
Iterable<String> ids)
add
public MultiGetRequestBuilder add(String index,
@Nullable
String type,
String... ids)
add
public MultiGetRequestBuilder add(MultiGetRequest.Item item)
setPreference
public MultiGetRequestBuilder setPreference(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.
setRefresh
public MultiGetRequestBuilder setRefresh(boolean refresh)
- Should a refresh be executed before this get operation causing the operation to
return the latest value. Note, heavy get should not set this to true. Defaults
to false.
setRealtime
public MultiGetRequestBuilder setRealtime(Boolean realtime)
setListenerThreaded
public MultiGetRequestBuilder setListenerThreaded(boolean threadedListener)
- Should the listener be called on a separate thread if needed.
doExecute
protected void doExecute(ActionListener<MultiGetResponse> listener)
- Specified by:
doExecute
in class BaseRequestBuilder<MultiGetRequest,MultiGetResponse>
Copyright © 2009-2012. All Rights Reserved.