Reindex changing types

Hello!

It's possible to reindex, changing datatype of a field? Or it's not possible and I have to delete bad fields and reindex without them?

Thanks so much.

You can use ingest node feature while reindexing but what is exactly the problem you have?

it's simple. I have an index like this:

"field": {
    "properties": {
        "subfield1": {
            "type": "float"
        },
        "subfield2": {
            "type": "float"
        },
        "subfield3": {
            "type": "text"
        }
    }
}

and I want to change a subfield. More or less like that:

"field": {
    "properties": {
        "subfield1": {
            "type": "float"
        },
        "subfield2": {
            "type": "float"
        },
        "subfield3": {
            "type": "float"
        }
    }
}

Right now I have some data with the original mapping, but it doesn't matter if some subfield3 data must be deleted.

Any idea?

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

I edited your post.

  1. Define an ingest pipeline which uses https://www.elastic.co/guide/en/elasticsearch/reference/master/convert-processor.html
  2. Use this ingest pipeline in the reindex operation.

Thanks so much. You're right, much more readable.

I'm going to try your solution.

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