|
|||||||||
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(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 |
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. |
void |
readFrom(StreamInput in)
|
DeleteRequest |
timeout(TimeValue timeout)
A timeout to wait if the index operation can't be performed immediately. |
java.lang.String |
toString()
|
DeleteRequest |
type(java.lang.String type)
Sets the type of the document to delete. |
ActionRequestValidationException |
validate()
|
void |
writeTo(StreamOutput out)
|
Methods inherited from class org.elasticsearch.action.support.replication.ShardReplicationOperationRequest |
---|
index, listenerThreaded, operationThreaded, 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 documentMethod 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
@Required public DeleteRequest type(java.lang.String type)
@Required public DeleteRequest id(java.lang.String id)
public DeleteRequest timeout(TimeValue timeout)
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 |