Created
November 28, 2014 14:27
-
-
Save jpountz/aaab323cfb2480433ac1 to your computer and use it in GitHub Desktop.
Set update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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