Skip to content

Instantly share code, notes, and snippets.

@melnikk
Last active August 8, 2017 13:51
Show Gist options
  • Save melnikk/63826ee977dc8fd209d3555efe49a504 to your computer and use it in GitHub Desktop.
Save melnikk/63826ee977dc8fd209d3555efe49a504 to your computer and use it in GitHub Desktop.
Replace value field in elasticsearch index
curl -XPOST 'localhost:9200/events/_update_by_query?pretty' -H 'Content-Type: application/json' -d'
{
"script": {
"inline": "ctx._source.tags = ctx._source.tags.replace(\".\", \"_\")"
},
"query" : {
"wildcard" : {
"tags" : "*deploy*"
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment