Skip to content

Instantly share code, notes, and snippets.

@marklin-latte
Created November 24, 2014 06:21
Show Gist options
  • Save marklin-latte/c57a9ce01ed1a48f9932 to your computer and use it in GitHub Desktop.
Save marklin-latte/c57a9ce01ed1a48f9932 to your computer and use it in GitHub Desktop.
ElasticSearch-Update Child Field
//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