mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
Using root object level mapping (_size, _source) can cause reparsing of the mapping on startup, close #1458.
This commit is contained in:
parent
3da6e0a5b0
commit
eb1b0b150f
@ -866,8 +866,13 @@ public class ObjectMapper implements Mapper, AllFieldMapper.IncludeInAll {
|
||||
mapper.toXContent(builder, params);
|
||||
}
|
||||
}
|
||||
if (additionalMappers != null) {
|
||||
if (additionalMappers != null && additionalMappers.length > 0) {
|
||||
TreeMap<String, Mapper> additionalSortedMappers = new TreeMap<String, Mapper>();
|
||||
for (Mapper mapper : additionalMappers) {
|
||||
additionalSortedMappers.put(mapper.name(), mapper);
|
||||
}
|
||||
|
||||
for (Mapper mapper : additionalSortedMappers.values()) {
|
||||
mapper.toXContent(builder, params);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user