Skip to content

Instantly share code, notes, and snippets.

@zhnlk
Created May 26, 2020 11:38
Show Gist options
  • Save zhnlk/a22fd61354ed4d55c5706cf6fc7b99af to your computer and use it in GitHub Desktop.
Save zhnlk/a22fd61354ed4d55c5706cf6fc7b99af to your computer and use it in GitHub Desktop.
POST index_article/_update_by_query
{
"script": {
"source": "ctx._source.attribute = params.attribute",
"params": {
"attribute": {
"link": null,
"image": null,
"author": {
"account": null,
"name": ""
},
"owner": null
}
},
"lang": "painless"
},
"query": {
"bool": {
"must_not": {
"exists": {
"field": "attribute.author.name"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment