org.elasticsearch.action.get
Class MultiGetRequestBuilder

java.lang.Object
  extended by org.elasticsearch.action.support.BaseRequestBuilder<MultiGetRequest,MultiGetResponse>
      extended by 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.


Field Summary
 
Fields inherited from class org.elasticsearch.action.support.BaseRequestBuilder
client, request
 
Constructor Summary
MultiGetRequestBuilder(Client client)
           
 
Method Summary
 MultiGetRequestBuilder add(MultiGetRequest.Item item)
           
 MultiGetRequestBuilder add(String index, String type, Iterable<String> ids)
           
 MultiGetRequestBuilder add(String index, String type, String... ids)
           
 MultiGetRequestBuilder add(String index, String type, String id)
           
protected  void doExecute(ActionListener<MultiGetResponse> listener)
           
 MultiGetRequestBuilder setListenerThreaded(boolean threadedListener)
          Should the listener be called on a separate thread if needed.
 MultiGetRequestBuilder setPreference(String preference)
          Sets the preference to execute the search.
 MultiGetRequestBuilder setRealtime(Boolean realtime)
           
 MultiGetRequestBuilder setRefresh(boolean refresh)
          Should a refresh be executed before this get operation causing the operation to return the latest value.
 
Methods inherited from class org.elasticsearch.action.support.BaseRequestBuilder
execute, execute, request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiGetRequestBuilder

public MultiGetRequestBuilder(Client client)
Method Detail

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.