接口实现查询热词统计"/>
elasticSearch 接口实现查询热词统计
前面讲过使用elasticsearch可视化工具可以直接写语法查询如下:
GET robot-demand/_search
{
"size":10, //查询多少条数据
"aggs":{
"hot_words":{
"terms":{
"field": "title"
}
}
}
}
结果如下:
#! Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See .14/security-minimal-setup.html to enable security.
{"took" : 1,"timed_out" : false,"_shards" : {"total" : 1,"successful" : 1,"skipped" : 0,"failed" : 0},"hits" : {"total" : {"value" : 8,"relation" : "eq"},"max_scor
更多推荐
elasticSearch 接口实现查询热词统计
发布评论