📜  elasticsearch 重新索引和重命名字段 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:09.593000             🧑  作者: Mango

代码示例1
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")"""
  }
}