# NOT RUN {
if (!index_exists("plos")) {
plosdat <- system.file("examples", "plos_data.json", package = "elastic")
docs_bulk(plosdat)
}
# delete a document
docs_get(index='plos', type='article', id=36)
docs_delete(index='plos', type='article', id=36)
# docs_get(index='plos', type='article', id=36) # and the document is gone
# }
Run the code above in your browser using DataLab