# NOT RUN {
connect()
if (!index_exists('plos')) {
plosdat <- system.file("examples", "plos_data.json", package = "elastic")
invisible(docs_bulk(plosdat))
}
docs_create(index='plos', type='article', id=1002,
body=list(id="12345", title="New title"))
# and the document is there now
docs_get(index='plos', type='article', id=1002)
# }
Run the code above in your browser using DataLab