|
@ -169,13 +169,11 @@ public class ElasticSearchHandler {
|
|
|
mapping.startObject(field).field("type", "string").field("index", "not_analyzed").endObject();
|
|
|
}else if(participle == 2) {
|
|
|
mapping.startObject(field).field("type", "string").endObject();
|
|
|
}else {
|
|
|
mapping.startObject(field).field("type", "keyword").field("index", "not_analyzed").endObject();
|
|
|
}
|
|
|
}else if("date".equals(dataType)){
|
|
|
mapping.startObject(field).field("type", dataType).field("format", "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis").endObject();
|
|
|
}else if("nested".equals(dataType)){//子集属性
|
|
|
mapping.startObject(field).startObject("properties");
|
|
|
mapping.startObject(field).field("type", "nested").startObject("properties");
|
|
|
//子属性
|
|
|
List<FieldInfo> childFieldList = info.getFieldInfos();
|
|
|
for(FieldInfo child : childFieldList){
|
|
@ -187,8 +185,6 @@ public class ElasticSearchHandler {
|
|
|
mapping.startObject(childField).field("type", "string").field("index", "not_analyzed").endObject();
|
|
|
}else if(childParticiple == 2) {
|
|
|
mapping.startObject(childField).field("type", "string").endObject();
|
|
|
}else {
|
|
|
mapping.startObject(childField).field("type", "keyword").field("index", "not_analyzed").endObject();
|
|
|
}
|
|
|
}else if("date".equals(dataType)){
|
|
|
mapping.startObject(childField).field("type", childDataType).field("format", "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis").endObject();
|