org.elasticsearch.client.action.delete
Class DeleteRequestBuilder

java.lang.Object
  extended by org.elasticsearch.client.action.support.BaseRequestBuilder<DeleteRequest,DeleteResponse>
      extended by org.elasticsearch.client.action.delete.DeleteRequestBuilder
All Implemented Interfaces:
RequestBuilder<DeleteRequest,DeleteResponse>

public class DeleteRequestBuilder
extends BaseRequestBuilder<DeleteRequest,DeleteResponse>

A delete document action request builder.


Field Summary
 
Fields inherited from class org.elasticsearch.client.action.support.BaseRequestBuilder
client, request
 
Constructor Summary
DeleteRequestBuilder(Client client, java.lang.String index)
           
 
Method Summary
protected  void doExecute(ActionListener<DeleteResponse> listener)
           
 DeleteRequestBuilder setConsistencyLevel(WriteConsistencyLevel consistencyLevel)
          Sets the consistency level.
 DeleteRequestBuilder setId(java.lang.String id)
          Sets the id of the document to delete.
 DeleteRequestBuilder setIndex(java.lang.String index)
          Sets the index the delete will happen on.
 DeleteRequestBuilder setListenerThreaded(boolean threadedListener)
          Should the listener be called on a separate thread if needed.
 DeleteRequestBuilder setOperationThreaded(boolean threadedOperation)
          Controls if the operation will be executed on a separate thread when executed locally.
 DeleteRequestBuilder setRefresh(boolean refresh)
          Should a refresh be executed post this index operation causing the operation to be searchable.
 DeleteRequestBuilder setReplicationType(ReplicationType replicationType)
          Set the replication type for this operation.
 DeleteRequestBuilder setRouting(java.lang.String routing)
          Controls the shard routing of the delete request.
 DeleteRequestBuilder setType(java.lang.String type)
          Sets the type of the document to delete.
 
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

DeleteRequestBuilder

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

setIndex

public DeleteRequestBuilder setIndex(java.lang.String index)
Sets the index the delete will happen on.


setType

public DeleteRequestBuilder setType(java.lang.String type)
Sets the type of the document to delete.


setId

public DeleteRequestBuilder setId(java.lang.String id)
Sets the id of the document to delete.


setRouting

public DeleteRequestBuilder setRouting(java.lang.String routing)
Controls the shard routing of the delete request. Using this value to hash the shard and not the id.


setRefresh

public DeleteRequestBuilder setRefresh(boolean refresh)
Should a refresh be executed post this index operation causing the operation to be searchable. Note, heavy indexing should not set this to true. Defaults to false.


setListenerThreaded

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


setOperationThreaded

public DeleteRequestBuilder setOperationThreaded(boolean threadedOperation)
Controls if the operation will be executed on a separate thread when executed locally. Defaults to true when running in embedded mode.


setReplicationType

public DeleteRequestBuilder setReplicationType(ReplicationType replicationType)
Set the replication type for this operation.


setConsistencyLevel

public DeleteRequestBuilder setConsistencyLevel(WriteConsistencyLevel consistencyLevel)
Sets the consistency level. Defaults to WriteConsistencyLevel.DEFAULT.


doExecute

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