标签:elastics search mamicode last arc 查询 src ast code
一、新增数据
1.1 随机生成id
语法:
POST /索引库名/类型名 { "key1": "value1", "key2": "value2", "key3": "value3" }
示例:
1.2 指定生成id
语法:
POST /索引库名/类型名/ID { "key1": "value1", "key2": "value2", "key3": "value3" }
示例:
二、根据id查询数据
语法:
GET /索引库名/类型名/ID
示例:
三、根据id修改数据
语法:
PUT /索引库名/类型名/ID { "key1": "value1", "key2": "value2", "key3": "value3" }
示例:
四、根据id删除数据
语法:
DELETE /索引库名/类型名/ID
示例:
标签:elastics search mamicode last arc 查询 src ast code
原文地址:https://www.cnblogs.com/heqiuyong/p/10350792.html