elasticsearch查询,elasticsearch常见查询,elasticsearch命令
elasticsearch常用命令
1、查询索引
GET _cat/indices
2、查看es磁盘使用情况
GET _cat/allocation?v&pretty
3、查看es分词情况
GET _analyze { "text": "中国" }
elasticsearch常用查询
查询基本语法,所有的查询都遵循:
GET /索引库名/_search { "query": { "查询类型": { "查询条件": "条件值" } } }
根据单个字段查询
GET /indexName/_search { "query": { "match": { "FIELD": "TEXT" } } }
根据多个字段查询
GET /indexName/_search { "query": { "multi_match": { "query": "TEXT", "fields": ["FIELD1", " FIELD12"] } } }
match和multi_match的区别是什么?
- match:根据一个字段查询
- multi_match:根据多个字段查询,参与查询字段越多,查询性能越差
根据多个id查询
GET vehicle_pass/_search { "query": { "ids": { "values": [ "eVZ6k4gB5D3TP6XJGiS4" ] } } }
参考:https://blog.csdn.net/m0_37922192/article/details/121449124
标签:search,GET,查询,elasticsearch,query,match From: https://www.cnblogs.com/liubaihui/p/17462465.html