https://qiita.com/tkprof/items/e50368eb1473497a16d0
How to Rename an Elasticsearch field
- from
columns:
- {name: xxx, type: double}
- to
columns:
- {name: yyy, type: double}
Pipeline API and reindex
- create a new Pipeline API : Rename Processor
PUT _ingest/pipeline/pipeline_rename_xxx
{
"description" : "rename xxx",
"processors" : [
{
"rename": {
"field": "xxx",
"target_field": "yyy"
}
}
]
}
{
"acknowledged": true
}
- then reindex
POST _reindex
{
"source": {
"index": "source"
},
"dest": {
"index": "dest",
"pipeline": "pipeline_rename_xxx"
}
}
Comments
Post a Comment