Learn R Programming

elastic (version 0.3.0)

docs_delete: Delete a document.

Description

Delete a document.

Usage

docs_delete(index, type, id, refresh = NULL, routing = NULL,
  timeout = NULL, version = NULL, version_type = NULL,
  callopts = list(), ...)

Arguments

index
(character) The name of the index. Required
type
(character) The type of the document. Required
id
(numeric) The document ID. Required
refresh
(logical) Refresh the index after performing the operation
routing
(charcter) Specific routing value
timeout
(charcter) Explicit operation timeout, e.g,. 5m (for 5 minutes)
version
(character) Explicit version number for concurrency control
version_type
(character) Specific version type. One of internal or external
callopts
Curl args passed on to DELETE
...
Further args to query DSL

References

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete.html

Examples

Run this code
docs_delete(index='plos', type='article', id=35)
docs_get(index='plos', type='article', id=35) # and the document is gone

Run the code above in your browser using DataLab