一、服务器测试是否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中叫桶聚合
讲的非常详细并举例说明。
精确查询:"track_total_hits":true
转载:ES命令: “track_total_hits“:true_我的博客-优快云博客_track_total_hits
返回结果的含义:
转载:理解Elasticsearch返回结果中命中数total值的具体含义_zhaojianting的博客-优快云博客_es hits total
本文介绍了如何在Elasticsearch中进行服务器连接测试及查询语句的使用。重点讲解了桶聚合的概念,提供了详细的聚合查询实例,并探讨了精确查询参数`track_total_hits`的设置及其在返回结果中的作用。
2万+

被折叠的 条评论
为什么被折叠?



