作者:張小媫_602 | 来源:互联网 | 2023-07-03 19:34
一、服务器测试是否es连接成功:
curl http://username:password@ip:port{"name" : "node-xxx","cluster_name" : "es","cluster_uuid" : "xxxxxxxx","version" : {"number" : "6.8.1","build_flavor" : "default","build_type" : "tar","build_hash" : "xxx","build_date" : "xxxxxx","build_snapshot" : false,"lucene_version" : "7.7.0","minimum_wire_compatibility_version" : "5.6.0","minimum_index_compatibility_version" : "5.0.0"},"tagline" : "You Know, for Search"
}
二、 查询语句:
聚合查询:es中叫桶聚合
转载:ES基本的聚合查询 - 简书
讲的非常详细并举例说明。
精确查询:"track_total_hits":true
转载:ES命令: “track_total_hits“:true_我的博客-CSDN博客_track_total_hits
返回结果的含义:
转载:理解Elasticsearch返回结果中命中数total值的具体含义_zhaojianting的博客-CSDN博客_es hits total