GET http://127.0.0.1:9200/_cat/indices?v 查看所有索引信息
GET http://127.0.0.1:9200/shopping 查询指定索引
PUT http://127.0.0.1:9200/shopping 创建索引,名字为shopping
DELETE http://127.0.0.1:9200/shopping 删除索引
文档基本操作
POST http://127.0.0.1:9200/shopping/_doc 此时id自动生成
POST http://127.0.0.1:9200/shopping/_doc/{id} 手动指定id
GET http://127.0.0.1:9200/shopping/_doc/1 主键查询
GET http://127.0.0.1:9200/shopping/_search 全查询
PUT http://127.0.0.1:9200/shopping/_doc/1 全量更新(更新内容放在body中)
POST http://127.0.0.1:9200/shopping/_update/1 增量更新
{"doc":{"title":"小米手机","category":"小米"}}
DELETE http://127.0.0.1:9200/shopping/_doc/{id}