Skip to content

Commit c2a0e0b

Browse files
committed
Mapper: Using dynamic_template can result in warning of parsed and original source difference (resulting in excessive mapping parsing), closes elastic#764.
1 parent f694b9d commit c2a0e0b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/DynamicTemplate.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.ArrayList;
2929
import java.util.List;
3030
import java.util.Map;
31+
import java.util.TreeMap;
3132

3233
/**
3334
* @author kimchy (shay.banon)
@@ -105,7 +106,7 @@ public static DynamicTemplate parse(String name, Map<String, Object> conf) throw
105106

106107
public DynamicTemplate(String name, Map<String, Object> conf, String pathMatch, String pathUnmatch, String match, String unmatch, String matchMappingType, MatchType matchType, Map<String, Object> mapping) {
107108
this.name = name;
108-
this.conf = conf;
109+
this.conf = new TreeMap<String, Object>(conf);
109110
this.pathMatch = pathMatch;
110111
this.pathUnmatch = pathUnmatch;
111112
this.match = match;

0 commit comments

Comments
 (0)