June 2017
Beginner to intermediate
404 pages
8h 22m
English
Mapping of the existing fields cannot be changed. As the documents are indexed, they are stored in the inverted index according to the data type. If you try to update the mapping of an existing field, you will get a mapping exception, as shown next:
{ "error": { "root_cause": [ { "type": "merge_mapping_exception", "reason": "Merge failed with failures {[mapper [username] of different type, current_type [string], merged_type [integer]]}" } ], "type": "merge_mapping_exception", "reason": "Merge failed with failures {[mapper [username] of different type, current_type [string], merged_type [integer]]}" }, "status": 400 }
You can always add new fields or use multi-fields to index the same field using multiple data types, but ...
Read now
Unlock full access