Index Mapping- Update API

We found an error in our index mapping and have successfully fixed the issue- all future indices will have the correct mapping; however, we are now looking to go back and fix all the old indices that have the incorrect mapping (they keep throwing shard errors when a queries are run)

The incorrect mappings on the old indices are ~2k lines long.
The correct mappings show ~5k lines.

Ive seen the update API for index mappings but that only shows a few stanzas at a time. Whats the best way to handle an index mapping update when it has to deal with this many lines? It also appears this update will need to be made to a lot of indices so any help on how to tackled multiple indices at once would help as well.

Are you just looking to update the mapping, or to reindex?

Would we need to re-index???
(The correct mapping has dynamic templates set and has the appropriate fields labeled as keyword so data can be aggregated)

What benefits would there be if we updated the mappings, but didn’t re-index?

What benefits would there be if we updated mapping and also reindexed?

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