Reindexing with new nested property changes dot to json representation

I am trying to reindex in order to make field renames. But there are a lot of challenges as the fields to be renamed and old fields are objects. Following is a sample code to represent the issue:

Processor Simulate

@POST http://localhost:9200/_ingest/pipeline/_simulate

{
  "pipeline": {
    "description": "rename value",
    "processors": [
      {
        "rename": {
          "field": "value",
          "target_field": "rename.dot.value"
        }
      }
    ]
  },
  "docs": [
    {
      "_index": "m01",
      "_type": "_doc",
      "_id": "tmsFWXgBxm2IA0nNFFyd",
      "_score": 1,
      "_source": {
        "value": 1577817000000,
        "normal.dot.value": 14.730047989520438
      }
    }
  ]
}

Output

{
  "docs": [
    {
      "doc": {
        "_index": "m01",
        "_type": "_doc",
        "_id": "tmsFWXgBxm2IA0nNFFyd",
        "_source": {
          "normal.dot.value": 14.730047989520438,
          "rename": {
            "dot": {
              "value": 1577817000000
            }
          }
        },
        "_ingest": {
          "timestamp": "2021-03-24T17:54:11.436172Z"
        }
      }
    }
  ]
}

There are two representations of object in output after applying processor, one with dot operator and other as json. I want all data to come with dot operator, please help me achieve this

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.