Created
November 24, 2014 06:21
-
-
Save marklin-latte/c57a9ce01ed1a48f9932 to your computer and use it in GitHub Desktop.
ElasticSearch-Update Child Field
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
//URI:POST | |
http://localhost:9200/11687/document/8132/_update?parent=6675 | |
11687 is index. | |
document is type. | |
8132 is documentId | |
//Json | |
{ | |
"script" : "ctx._source.LatestVersion = LatestVersion", | |
"params" : { | |
"LatestVersion" : false | |
} | |
} | |
_soruce.XXXX , XXXX is FieldName | |
//Result | |
{ | |
"_index": "11687", | |
"_type": "document", | |
"_id": "8132", | |
"_version": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment