|
@ -171,7 +171,7 @@ public class ElasticSearchHandler {
|
|
|
mapping.startObject(field).field("type", "string").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();
|
|
|
mapping.startObject(field).field("type", "date").field("format", "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis").endObject();
|
|
|
}else if("nested".equals(dataType)){//子集属性
|
|
|
mapping.startObject(field).field("type", "nested").startObject("properties");
|
|
|
//子属性
|
|
@ -187,7 +187,7 @@ public class ElasticSearchHandler {
|
|
|
mapping.startObject(childField).field("type", "string").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();
|
|
|
mapping.startObject(childField).field("type", "date").field("format", "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis").endObject();
|
|
|
}else {
|
|
|
mapping.startObject(childField) .field("type", childDataType).endObject();
|
|
|
}
|