Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

elasticsearch reindex and rename field

POST _reindex
{
  "source": {
    "index": "products-2018.04.05"
  },
  "dest": {
    "index": "products-reindex-2018.04.05"
  },
  "script": {
    "inline": """ctx._source['PRODUCT.RPT.VALUEAVG'] = ctx._source.remove("PRODUCT.RPT.VALUE.AVG")"""
  }
}
Source by discuss.elastic.co #
 
PREVIOUS NEXT
Tagged: #elasticsearch #reindex #rename #field
ADD COMMENT
Topic
Name
1+7 =