org.elasticsearch.client.action.get
Class GetRequestBuilder

java.lang.Object
  extended by org.elasticsearch.client.action.support.BaseRequestBuilder<GetRequest,GetResponse>
      extended by org.elasticsearch.client.action.get.GetRequestBuilder
All Implemented Interfaces:
RequestBuilder<GetRequest,GetResponse>

public class GetRequestBuilder
extends BaseRequestBuilder<GetRequest,GetResponse>

A get document action request builder.


Field Summary
 
Fields inherited from class org.elasticsearch.client.action.support.BaseRequestBuilder
client, request
 
Constructor Summary
GetRequestBuilder(Client client, java.lang.String index)
           
 
Method Summary
protected  void doExecute(ActionListener<GetResponse> listener)
           
 GetRequestBuilder setFields(java.lang.String... fields)
          Explicitly specify the fields that will be returned.
 GetRequestBuilder setId(java.lang.String id)
          Sets the id of the document to fetch.
 GetRequestBuilder setIndex(java.lang.String index)
          Sets the index of the document to fetch.
 GetRequestBuilder setListenerThreaded(boolean threadedListener)
          Should the listener be called on a separate thread if needed.
 GetRequestBuilder setOperationThreaded(boolean threadedOperation)
          Controls if the operation will be executed on a separate thread when executed locally.
 GetRequestBuilder setType(java.lang.String type)
          Sets the type of the document to fetch.
 
Methods inherited from class org.elasticsearch.client.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

GetRequestBuilder

public GetRequestBuilder(Client client,
                         @Nullable
                         java.lang.String index)
Method Detail

setIndex

public GetRequestBuilder setIndex(java.lang.String index)
Sets the index of the document to fetch.


setType

public GetRequestBuilder setType(java.lang.String type)
Sets the type of the document to fetch.


setId

public GetRequestBuilder setId(java.lang.String id)
Sets the id of the document to fetch.


setFields

public GetRequestBuilder setFields(java.lang.String... fields)
Explicitly specify the fields that will be returned. By default, the _source field will be returned.


setListenerThreaded

public GetRequestBuilder setListenerThreaded(boolean threadedListener)
Should the listener be called on a separate thread if needed.


setOperationThreaded

public GetRequestBuilder setOperationThreaded(boolean threadedOperation)
Controls if the operation will be executed on a separate thread when executed locally.


doExecute

protected void doExecute(ActionListener<GetResponse> listener)
Specified by:
doExecute in class BaseRequestBuilder<GetRequest,GetResponse>