humbleCoder
humbleCoder

Reputation: 685

Is it possible to update a mapping data type of a field in a document in elasticsearch 6.3.2?

Is it possible to update a mapping data type of a field in a document in elasticsearch? Do I have to drop the whole index and add a create a new one with the new mappings and all the documents to it again or is it possible to change the mapping and ask elasticsearch to reindex all documents with new mapping properties? The second way I dont lose all the documents.

Elasticsearch version : 6.3.2

Upvotes: 0

Views: 173

Answers (1)

René Winkler
René Winkler

Reputation: 7088

You have to reindex your data after you have changed the mapping. This is not only an issue of elasticsesrch, but applies to databases in general.

The best solution is to create a new index.

Upvotes: 2

Related Questions