新建表(Mapping) 示例
PUT user_manager
{
"mappings": {
"properties": {
"id": {
"type": "keyword"
},
"status": {
"type": "keyword"
},
"createTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"updateTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
}
}
}
}
新增字段(Field) 示例
POST user_manager/_mapping
{
"properties": {
"openId": {
"type": "keyword"
}
}
}
新增文档(doc) 示例
POST user_manager/_doc/1551753844109601212
{
"id": "1551753844109601212",
"type": [
"3"
],
"userId": "123",
"userName": "test",
"title": "大欢喜",
"thumb": "img/test.png",
"status": "1",
"createTime": "2022-07-08 16:32:23",
"updateTime": "2022-07-08 16:32:23"
}
标签:示例,doc,新增,Mapping,Field,manager,type
From: https://www.cnblogs.com/yourxiong/p/16882087.html