Copy data to new index and change data type

I need to change data types of two of my fields.

  1. From string to object
  2. From Nested (array) to object.

I understand that this cannot be changed within the same index and I would have to use _REINDEX.

I am been trying to do this but been largely unsuccessfull.

Example:

Below are the current fields:

"role": "Full",
"access": [
            {
              "client": "Full"
            }
 ]

New fields:

"role": {
            "env1": "Full",
            "env2": "Full",
            "env3": "Full"
          },
"access": {
            "env1": [
              {
                "client": "Full"
              }
            ],
            "env2": [
              {
                "client": "Full"
              }
            ],
            "env3": [
              {
                "client": "Full"
              }
            ]
}

I understand that we use ingest node feature but it doesn't seem to work with objects. Please help?

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