How do I copy and modify a schema?

I indexed a bunch of documents and let Elastic automatically pick the field types. It got some of them right and some of them wrong. (e.g. a field is keyword when it should be string and vice versa). My documents have many fields, and it appears the easiest thing to do will be to copy the schema, modify the types I don't like, and reingest.

Is this a standard strategy? What is the easiest way to go about it? Can I do the whole procedure in Kibana.

It's a mapping in Elasticsearch, not a schema like a database :slight_smile:

You can get it via GET INDEX/_mapping.
You cannot update a mapping for an existing field, you will need to create a new index with the updated mapping and then do a reindex.

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