Created
October 7, 2018 18:38
-
-
Save lloiacono/6be26a834cb12dbd547d42cb229350c8 to your computer and use it in GitHub Desktop.
ES painless script example: remove element from array
This file contains 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
curl -X POST \ | |
http://some:port/indexname/_doc/docId/_update \ | |
-H 'Cache-Control: no-cache' \ | |
-H 'Content-Type: application/json' \ | |
-d '{ | |
"script": { | |
"lang": "painless", | |
"inline": "ctx._source.first_name.remove(ctx._source.first_name.length - 1)" | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment