新
| | |
功能介绍
1.将
mapping中的properties内容转为struct如下:
{
"mappings": {
"properties": {
"doc_id": {
"type": "keyword"
},
"id": {
"type": "long"
},
"path": {
"type": "keyword"
},
"name": {
"type": "text"
},
"url": {
"type": "keyword"
},
"description": {
"type": "text"
},
"created_time": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
}
}
}
}
处理后
public class Es2StructTmp {
private String created_time;
private String description;
private String doc_id;
private Integer id;
private String name;
private String path;
private String url;
public String getCreated_time() {
return this.created_time;
}
public void setCreated_time(String created_time) {
this.created_time = created_time;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public String getDoc_id() {
return this.doc_id;
}
public void setDoc_id(String doc_id) {
this.doc_id = doc_id;
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getPath() {
return this.path;
}
public void setPath(String path) {
this.path = path;
}
public String getUrl() {
return this.url;
}
public void setUrl(String url) {
this.url = url;
}
}