Learn R Programming

elastic (version 0.3.0)

docs_bulk: Use the bulk API to create, index, update, or delete documents.

Description

Use the bulk API to create, index, update, or delete documents.

Usage

docs_bulk(filename, raw = FALSE, ...)

Arguments

filename
Path to a file to load in the bulk API
raw
(logical) Get raw JSON back or not.
...
Pass on curl options to the POST call.

Details

More on the Bulk API: http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/bulk.html.

Examples

Run this code
plosdat <- system.file("examples", "plos_data.json", package = "elastic")
docs_bulk(plosdat)
aliases_get()
index_delete(index='plos')
aliases_get()

# Curl options
library("httr")
plosdat <- system.file("examples", "plos_data.json", package = "elastic")
docs_bulk(plosdat, config=verbose())

Run the code above in your browser using DataLab