From d5ed89b946297270ec28abf44bef2371a06f1f4f Mon Sep 17 00:00:00 2001
From: Hilko Bengen <bengen@debian.org>
Date: Sat, 7 Jun 2014 12:02:12 +0200
Subject: Imported Upstream version 1.0.3

---
 docs/java-api/delete.asciidoc | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 docs/java-api/delete.asciidoc

(limited to 'docs/java-api/delete.asciidoc')

diff --git a/docs/java-api/delete.asciidoc b/docs/java-api/delete.asciidoc
new file mode 100644
index 0000000..409b5be
--- /dev/null
+++ b/docs/java-api/delete.asciidoc
@@ -0,0 +1,40 @@
+[[delete]]
+== Delete API
+
+The delete API allows to delete a typed JSON document from a specific
+index based on its id. The following example deletes the JSON document
+from an index called twitter, under a type called tweet, with id valued
+1:
+
+[source,java]
+--------------------------------------------------
+DeleteResponse response = client.prepareDelete("twitter", "tweet", "1")
+        .execute()
+        .actionGet();
+--------------------------------------------------
+
+For more information on the delete operation, check out the
+{ref}/docs-delete.html[delete API] docs.
+
+
+[[operation-threading]]
+=== Operation Threading
+
+The delete API allows to set the threading model the operation will be
+performed when the actual execution of the API is performed on the same
+node (the API is executed on a shard that is allocated on the same
+server).
+
+The options are to execute the operation on a different thread, or to
+execute it on the calling thread (note that the API is still async). By
+default, `operationThreaded` is set to `true` which means the operation
+is executed on a different thread. Here is an example that sets it to
+`false`:
+
+[source,java]
+--------------------------------------------------
+DeleteResponse response = client.prepareDelete("twitter", "tweet", "1")
+        .setOperationThreaded(false)
+        .execute()
+        .actionGet();
+--------------------------------------------------
-- 
cgit v1.2.3

