Package org.elasticsearch.action.delete
Class DeleteRequestBuilder
- java.lang.Object
-
- org.elasticsearch.action.ActionRequestBuilder<Request,Response,RequestBuilder>
-
- org.elasticsearch.action.support.replication.ReplicationRequestBuilder<DeleteRequest,DeleteResponse,DeleteRequestBuilder>
-
- org.elasticsearch.action.delete.DeleteRequestBuilder
-
- All Implemented Interfaces:
WriteRequestBuilder<DeleteRequestBuilder>
public class DeleteRequestBuilder extends ReplicationRequestBuilder<DeleteRequest,DeleteResponse,DeleteRequestBuilder> implements WriteRequestBuilder<DeleteRequestBuilder>
A delete document action request builder.
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
-
Constructor Summary
Constructors Constructor Description DeleteRequestBuilder(ElasticsearchClient client, DeleteAction action)DeleteRequestBuilder(ElasticsearchClient client, DeleteAction action, java.lang.String index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeleteRequestBuildersetId(java.lang.String id)Sets the id of the document to delete.DeleteRequestBuildersetParent(java.lang.String parent)Sets the parent id of this document.DeleteRequestBuildersetRouting(java.lang.String routing)Controls the shard routing of the delete request.DeleteRequestBuildersetType(java.lang.String type)Sets the type of the document to delete.DeleteRequestBuildersetVersion(long version)Sets the version, which will cause the delete operation to only be performed if a matching version exists and no changes happened on the doc since then.DeleteRequestBuildersetVersionType(VersionType versionType)Sets the type of versioning to use.-
Methods inherited from class org.elasticsearch.action.ActionRequestBuilder
execute, execute, get, get, get, request
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.elasticsearch.action.support.replication.ReplicationRequestBuilder
setIndex, setTimeout, setTimeout, setWaitForActiveShards, setWaitForActiveShards
-
Methods inherited from interface org.elasticsearch.action.support.WriteRequestBuilder
request, setRefreshPolicy, setRefreshPolicy
-
-
-
-
Constructor Detail
-
DeleteRequestBuilder
public DeleteRequestBuilder(ElasticsearchClient client, DeleteAction action)
-
DeleteRequestBuilder
public DeleteRequestBuilder(ElasticsearchClient client, DeleteAction action, @Nullable java.lang.String index)
-
-
Method Detail
-
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.
-
setParent
public DeleteRequestBuilder setParent(java.lang.String parent)
Sets the parent id of this document. Will simply set the routing to this value, as it is only used for routing with delete requests.
-
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.
-
setVersion
public DeleteRequestBuilder setVersion(long version)
Sets the version, which will cause the delete operation to only be performed if a matching version exists and no changes happened on the doc since then.
-
setVersionType
public DeleteRequestBuilder setVersionType(VersionType versionType)
Sets the type of versioning to use. Defaults toVersionType.INTERNAL.
-
-