Skip to content

Instantly share code, notes, and snippets.

@jpountz
Created November 28, 2014 14:27
Show Gist options
  • Save jpountz/aaab323cfb2480433ac1 to your computer and use it in GitHub Desktop.
Save jpountz/aaab323cfb2480433ac1 to your computer and use it in GitHub Desktop.
Set update
DELETE test
PUT test/test/1
{
"values": ["a", "c"]
}
POST test/test/1/_update
{
"script": "def values = ctx._source.values as Set; ctx._source.values = values + new_values",
"params": {
"new_values": ["b", "a"]
}
}
GET test/test/1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment