|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.action.support.replication.ShardReplicationOperationRequest org.elasticsearch.action.delete.DeleteRequest
public class DeleteRequest
A request to delete a document from an index based on its type and id. Best created using
Requests.deleteRequest(String)
.
The operation requires the ShardReplicationOperationRequest.index()
, type(String)
and id(String)
to
be set.
DeleteResponse
,
Client.delete(DeleteRequest)
,
Requests.deleteRequest(String)
Field Summary |
---|
Fields inherited from class org.elasticsearch.action.support.replication.ShardReplicationOperationRequest |
---|
DEFAULT_TIMEOUT, index, timeout |
Constructor Summary | |
---|---|
DeleteRequest()
|
|
DeleteRequest(java.lang.String index)
Constructs a new delete request against the specified index. |
|
DeleteRequest(java.lang.String index,
java.lang.String type,
java.lang.String id)
Constructs a new delete request against the specified index with the type and id. |
Method Summary | |
---|---|
DeleteRequest |
consistencyLevel(WriteConsistencyLevel consistencyLevel)
Sets the consistency level of write. |
java.lang.String |
id()
The id of the document to delete. |
DeleteRequest |
id(java.lang.String id)
Sets the id of the document to delete. |
DeleteRequest |
index(java.lang.String index)
Sets the index the delete will happen on. |
DeleteRequest |
listenerThreaded(boolean threadedListener)
Should the listener be called on a separate thread if needed. |
DeleteRequest |
operationThreaded(boolean threadedOperation)
Controls if the operation will be executed on a separate thread when executed locally. |
DeleteRequest |
parent(java.lang.String parent)
Sets the parent id of this document. |
void |
readFrom(StreamInput in)
|
boolean |
refresh()
|
DeleteRequest |
refresh(boolean refresh)
Should a refresh be executed post this index operation causing the operation to be searchable. |
DeleteRequest |
replicationType(ReplicationType replicationType)
Set the replication type for this operation. |
java.lang.String |
routing()
Controls the shard routing of the delete request. |
DeleteRequest |
routing(java.lang.String routing)
Controls the shard routing of the request. |
DeleteRequest |
timeout(TimeValue timeout)
A timeout to wait if the index operation can't be performed immediately. |
java.lang.String |
toString()
|
java.lang.String |
type()
The type of the document to delete. |
DeleteRequest |
type(java.lang.String type)
Sets the type of the document to delete. |
ActionRequestValidationException |
validate()
|
long |
version()
|
DeleteRequest |
version(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. |
VersionType |
versionType()
|
DeleteRequest |
versionType(VersionType versionType)
|
void |
writeTo(StreamOutput out)
|
Methods inherited from class org.elasticsearch.action.support.replication.ShardReplicationOperationRequest |
---|
beforeLocalFork, consistencyLevel, index, listenerThreaded, operationThreaded, replicationType, timeout |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DeleteRequest(java.lang.String index)
type(String)
and id(String)
must be set.
public DeleteRequest(java.lang.String index, java.lang.String type, java.lang.String id)
index
- The index to get the document fromtype
- The type of the documentid
- The id of the documentpublic DeleteRequest()
Method Detail |
---|
public ActionRequestValidationException validate()
validate
in interface ActionRequest
validate
in class ShardReplicationOperationRequest
public DeleteRequest index(java.lang.String index)
index
in class ShardReplicationOperationRequest
public DeleteRequest listenerThreaded(boolean threadedListener)
listenerThreaded
in interface ActionRequest
listenerThreaded
in class ShardReplicationOperationRequest
public DeleteRequest operationThreaded(boolean threadedOperation)
operationThreaded
in class ShardReplicationOperationRequest
public DeleteRequest replicationType(ReplicationType replicationType)
replicationType
in class ShardReplicationOperationRequest
public DeleteRequest consistencyLevel(WriteConsistencyLevel consistencyLevel)
WriteConsistencyLevel.DEFAULT
consistencyLevel
in class ShardReplicationOperationRequest
public java.lang.String type()
@Required public DeleteRequest type(java.lang.String type)
public java.lang.String id()
@Required public DeleteRequest id(java.lang.String id)
public DeleteRequest timeout(TimeValue timeout)
public DeleteRequest parent(java.lang.String parent)
public DeleteRequest routing(java.lang.String routing)
public java.lang.String routing()
public DeleteRequest refresh(boolean refresh)
public boolean refresh()
public DeleteRequest version(long version)
public long version()
public DeleteRequest versionType(VersionType versionType)
public VersionType versionType()
public void readFrom(StreamInput in) throws java.io.IOException
readFrom
in interface Streamable
readFrom
in class ShardReplicationOperationRequest
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
writeTo
in interface Streamable
writeTo
in class ShardReplicationOperationRequest
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |