parent
34e9f8e83b
commit
8ab22a53fe
|
@ -154,7 +154,7 @@ public class DynamicTemplate {
|
|||
}
|
||||
|
||||
public String mappingType(String dynamicType) {
|
||||
return mapping.containsKey("type") ? mapping.get("type").toString() : dynamicType;
|
||||
return mapping.containsKey("type") ? mapping.get("type").toString().replace("{dynamic_type}", dynamicType).replace("{dynamicType}", dynamicType) : dynamicType;
|
||||
}
|
||||
|
||||
private boolean patternMatch(String pattern, String str) {
|
||||
|
|
|
@ -5,13 +5,10 @@
|
|||
"tempalte_1":{
|
||||
"match":"multi*",
|
||||
"mapping":{
|
||||
"type":"multi_field",
|
||||
"type":"{dynamic_type}",
|
||||
"index":"analyzed",
|
||||
"store":"yes",
|
||||
"fields":{
|
||||
"{name}":{
|
||||
"type":"{dynamic_type}",
|
||||
"index":"analyzed",
|
||||
"store":"yes"
|
||||
},
|
||||
"org":{
|
||||
"type":"{dynamic_type}",
|
||||
"index":"not_analyzed",
|
||||
|
|
Loading…
Reference in New Issue