LoginSignup
0
0

More than 5 years have passed since last update.

Elasticsearch : How to rename a field

Last updated at Posted at 2018-10-03

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"
  }
} 

References

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0