1索引操作
(1)查询所有索引
GET /_cat/indices?v
(2)删除某个索引
DELETE /索引名
(3)新增索引
PUT /索引名(user)
(4)创建映射(以索引名:user 和类型:userinfo为例)
(5)新增⽂档数据
PUT /user/userinfo/1 { "name":"李四", "age":22, "city":"深圳", "description":"李四来⾃湖北武汉!" }
(6)修改数据
2 数据查询
(1)查询所有数据
GET /user/_search
(2)根据ID查询
GET /user/userinfo/1
(3)Sort排序
(4)分页
3 查询模式
(1)term查询:term主要⽤于分词精确匹配,如字符串、数值、⽇期等
(2)terms 查询:terms 跟 term 有点类似,但 terms 允许指定多个匹配条件
(3)match查询
(4)query_string查询
(5) match_all 查询
(6) match 查询