Skip to content

Commit

Permalink
Using root object level mapping (_size, _source) can cause reparsing …
Browse files Browse the repository at this point in the history
…of the mapping on startup, close elastic#1458.
  • Loading branch information
kimchy committed Nov 13, 2011
1 parent a56947b commit 2971671
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,13 @@ public void toXContent(XContentBuilder builder, Params params, ToXContent custom
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);
}
}
Expand Down

0 comments on commit 2971671

Please sign in to comment.