index_bulk_dataframe: Index data frame with Elasticsearch Bulk API

Description Usage Arguments Examples

View source: R/utils.R

Description

Helper function to orchestrate the assembly of the Bulk API upload file, http request to Elasticsearch and handling any subsequent respose errors. It's primary purpose is to be called repeatedly on 'chunks' of a data frame that is too bid to be indexed with a single call to the Bulk API (and hence the split into smaller more manageable chunks).

Usage

1

Arguments

rescource

An elastic_rescource object that contains the information on the Elasticsearch cluster, index and document type, where the indexed data will reside. If this does not already exist, it will be created automatically.

df

data.frame whose rows will be indexed as documents in the Elasticsearch cluster.

Examples

1
2
3
4
5
## Not run: 
rescource <- elastic("http://localhost:9200", "iris", "data")
index_bulk_dataframe(rescource, iris)

## End(Not run)

elasticsearchr documentation built on July 31, 2019, 1:05 a.m.