| 12345678910111213141516171819202122232425262728293031323334353637383940 | [[delete]]== Delete APIThe delete API allows to delete a typed JSON document from a specificindex based on its id. The following example deletes the JSON documentfrom an index called twitter, under a type called tweet, with id valued1:[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 ThreadingThe delete API allows to set the threading model the operation will beperformed when the actual execution of the API is performed on the samenode (the API is executed on a shard that is allocated on the sameserver).The options are to execute the operation on a different thread, or toexecute it on the calling thread (note that the API is still async). Bydefault, `operationThreaded` is set to `true` which means the operationis 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();--------------------------------------------------
 |