Skip to content

Instantly share code, notes, and snippets.

@An0nymous0
Last active April 12, 2019 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save An0nymous0/798b379160ae842442e8b683745877aa to your computer and use it in GitHub Desktop.
Save An0nymous0/798b379160ae842442e8b683745877aa to your computer and use it in GitHub Desktop.
elasticsearch
POST productindex/product/_mapping?pretty
{
"product": {
"properties": {
"saleType":{
"type":"integer"
}
}
}
}
POST /productindex/product/_update_by_query
{
"script": {
"lang": "painless",
"inline": "if (ctx._source.saleType == null) {ctx._source.saleType= 2}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment