elasticSearch 接口实现查询热词统计

编程入门 行业动态 更新时间:2024-10-25 21:16:01

elasticSearch <a href=https://www.elefans.com/category/jswz/34/1771365.html style=接口实现查询热词统计"/>

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 接口实现查询热词统计

本文发布于:2023-11-16 09:49:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1616946.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:接口   elasticSearch

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!