mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-10 15:05:33 +00:00
Today we only check mapping compatibility when adding mappers to the lookup structure. However, at this stage, the mapping has already been merged partially, so we can leave mappings in a bad state. This commit removes the compatibility check from Mapper.merge entirely and performs it _before_ we call Mapper.merge. One minor regression is that the exception messages don't group together errors that come from MappedFieldType.checkCompatibility and Mapper.merge. Since we run the former before the latter, Mapper.merge won't even have a chance to let the user know about conflicts if conflicts were discovered by MappedFieldType.checkCompatibility. Close #15049