Description Usage Arguments Value See Also Examples
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.
1 | create_metadata(action, index, doc_type, id = NULL, n = NULL)
|
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 |
A character vector of Bulk API document information objects.
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html for more information on the information required by the Elasticsearch Bulk API.
1 2 3 4 5 6 | ## Not run:
create_metadata("index", "iris", "data", n = 2)
'{\"index\": {\"_index\": \"iris\", \"_type\": \"data\"}}'
'{\"index\": {\"_index\": \"iris\", \"_type\": \"data\"}}'
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.