The fastest way to index, delete or update many documents, is via the Bulk API. This requires
that each document have the action combined with the document's metadata (index, type and id)
sent to the API. This information is encapulated as a JSON object, that this function is
responsible for generating.
Usage
create_metadata(action, index, doc_type, id = NULL, n = NULL)
Arguments
action
One of: "index", "create", "update" or "delete".
index
The name of the index where the documents reside (or will reside).
doc_type
The name of the document type where the documents reside (or will reside).
id
[optional] Character vector of document ids.
n
[optional] Integer number of repeated metadata description objects that need to be
returned (if id is not specified).
Value
A character vector of Bulk API document information objects.