Learn R Programming

elasticsearch (version 0.1.0)

update: update

Description

Update parts of a document update updates a document based on a script provided.

Usage

update(client, ...)
"update"(client, index, type, id, body, routing = NULL, parent = NULL, timeout = "1m", refresh = FALSE, fields = NULL, version = NULL, version_type = NULL, validate_params = TRUE, raw = FALSE, consistency = NULL, lang = "groovy", replication = "sync", retry_on_conflict = NULL, timestamp = NULL, ttl = NULL)

Arguments

index
type
id
body
Json
routing
String Specific routing value
parent
String ID of the parent document
timeout
Number Explicit operation timeout
refresh
Logical Refresh the index after performing the operation
fields
String, String[], Logical A comma-separated list of fields to return in the response
version
Number Explicit version number for concurrency control
version_type
String Specific version type
consistency
String Explicit write consistency setting for the operation
lang
String The script language (default: groovy)
replication
String Specific replication type
retry_on_conflict
Number Specify how many times should the operation be retried when a conflict occurs (default: 0)
timestamp
Date Explicit timestamp for the document
ttl
Duration Expiration time for the document

References

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html

Examples

Run this code
update("twitter", "tweet", 1)

Run the code above in your browser using DataLab