kibana中输入:GET /_search 会返回一下结果:

  1. {
  2. "took": 9, # took:整个搜索请求花费多少毫秒
  3. "timed_out": false,
  4. "_shards": { # shards:shards fail的条件,primary和replica全部挂掉,不影响其他shard。
  5. # 默认情况,一个搜索请求,会发送到一个index的所有primary shard上;
  6. # 当然,一个primary shard可能会有多个replica shard,所以请求也可能到其中某个replica shard 上。
  7. "total": 20,
  8. "successful": 20,
  9. "skipped": 0,
  10. "failed": 0
  11. },
  12. "hits": {
  13. "total": 6, # 本次搜索,返回多少条结果
  14. "max_score": 1, # 本次搜索结果中最大的相关分数,
  15. # 每一条document对于search的相关度,越相关,source分数越大,排位越靠前
  16. "hits": [ # 默认查询前十条数据,查询完整的数据,以_source降序排序
  17. {
  18. "_index": "ecommerce",
  19. "_type": "product",
  20. "_id": "2",
  21. "_score": 1,
  22. "_source": {
  23. "name": "jiajieshi yagao",
  24. "desc": "youxiao fangzhu",
  25. "price": 25,
  26. "producer": "jiajieshi producer",
  27. "tags": [
  28. "fangzhu"
  29. ]
  30. }
  31. },
  32. {
  33. "_index": "test_index",
  34. "_type": "test_type",
  35. "_id": "2",
  36. "_score": 1,
  37. "_source": {
  38. "test_field": "test client 1"
  39. }
  40. },
  41. {
  42. "_index": "ecommerce",
  43. "_type": "product",
  44. "_id": "1",
  45. "_score": 1,
  46. "_source": {
  47. "name": "gaolujie yagao",
  48. "desc": "gaoxiao meibai",
  49. "price": 30,
  50. "producer": "gaolujie producer",
  51. "tags": [
  52. "meibai",
  53. "fangzhu"
  54. ]
  55. }
  56. },
  57. {
  58. "_index": "my_index",
  59. "_type": "my_type",
  60. "_id": "1",
  61. "_score": 1,
  62. "_source": {
  63. "test_field": "test data 1"
  64. }
  65. },
  66. {
  67. "_index": "test_index",
  68. "_type": "test_type",
  69. "_id": "1",
  70. "_score": 1,
  71. "_source": {
  72. "test_field": "test client 1"
  73. }
  74. },
  75. {
  76. "_index": "ecommerce",
  77. "_type": "product",
  78. "_id": "3",
  79. "_score": 1,
  80. "_source": {
  81. "name": "zhonghua yagao",
  82. "desc": "caoben zhiwu",
  83. "price": 40,
  84. "producer": "zhonghua producer",
  85. "tags": [
  86. "qingxin"
  87. ]
  88. }
  89. }
  90. ]
  91. }
  92. }

elasticsearch _search结果解析的更多相关文章

  1. 渣渣菜鸡的 ElasticSearch 源码解析 —— 启动流程(下)

    关注我 转载请务必注明原创地址为:http://www.54tianzhisheng.cn/2018/08/12/es-code03/ 前提 上篇文章写完了 ES 流程启动的一部分,main 方法都入 ...

  2. 渣渣菜鸡的 ElasticSearch 源码解析 —— 启动流程(上)

    关注我 转载请务必注明原创地址为:http://www.54tianzhisheng.cn/2018/08/11/es-code02/ 前提 上篇文章写了 ElasticSearch 源码解析 -- ...

  3. ElasticSearch源码解析(五):排序(评分公式)

    ElasticSearch源码解析(五):排序(评分公式) 转载自:http://blog.csdn.net/molong1208/article/details/50623948   一.目的 一个 ...

  4. Splunk和ElasticSearch深度对比解析(转)

    转载自:http://www.sohu.com/a/154105465_354963 随着Splunk越来越被大家熟知和认可,现在市面上也不断涌各种同类产品,作为大数据搜索界的翘楚Splunk和Ela ...

  5. ElasticSearch的概念解析

    ElasticSearch是面向文档的,它不仅仅可以存储整个对象或则文档(document),还会索引(index)每个文档的内容使它可以被快速的检索.ElasticSearch和关系型数据库的对比如 ...

  6. 渣渣菜鸡的 ElasticSearch 源码解析 —— 环境搭建

    关注我 转载请务必注明原创地址为:http://www.54tianzhisheng.cn/2018/08/25/es-code01/ 软件环境 1.Intellij Idea:2018.2版本 2. ...

  7. Elasticsearch 监控指标解析

    1.集群监控 集群监控主要包括两个方面的内容,分别是集群健康情况和集群的运行状态. 集群健康状态可以通过以下api获取: http://ip:9200/_cluster/health?pretty 关 ...

  8. Elasticsearch源码解析:环境搭建

    在之前学习Redis的过程中,我就是一边通过文档/视频学习,一边阅读源码.我发现两种方法可以相辅相成,互相补充.阅读文档可以帮助我们快速了解某个功能,阅读源码有助于我们更深入的理解这一功能的实现及思想 ...

  9. 使用Java客户端操作elasticsearch

    Java REST客户端有两种风格: Java低级别REST客户端(Java Low Level REST Client,以后都简称低级客户端算了,难得码字):Elasticsearch的官方low- ...

随机推荐

  1. EXCEL导入数据到SQL SERVER 2008

    项目中需要导入excel到SQL SERVER数据库 总是报截断, 本质问题是,SQL SERVER导入程序是根据EXCEL的第一行记录 (非标题行)来决定数据长度的 碰到这个问题,可以伪造第一行,然 ...

  2. phpstorm快捷键使用

  3. <你们都是魔鬼吗>第二次团队作业:团队项目选题

    第二次团队作业:团队项目选题 项目 内容 这个作业属于哪个课程 任课教师博客主页链接 这个作业的要求在哪里 作业链接地址 团队名称 你们都是魔鬼吗 作业学习目标 任务1: 团队初选项目可行性自评,使用 ...

  4. GBDT算法梳理

    1.GBDT(Gradient Boosting Decision Tree)思想 Boosting : 给定初始训练数据,由此训练出第一个基学习器: 根据基学习器的表现对样本进行调整,在之前学习器做 ...

  5. h5css样式

    兼容性前缀: 谷歌:webkit 火狐:moz ie:ms 欧鹏:o选择器: 属性选择器: * = 包含 {href * = 'www'} ^ = 以什么开头 $ = 以什么结尾 伪类选择器: 第一个 ...

  6. vuex的使用介绍

    1.vuex是什么? vuex是一个专为vue.js应用程序开发的状态管理模式(它采用集中式存贮管理应用的所有组件的状态,并以相应的规则保证状态以一种可预测的方式发生变化). 2.vuex的核心概念? ...

  7. yum -y install 问题解决

    1.错误如下: Last login: Thu Jul 26 09:04:14 2018 from 192.168.3.250[root@diagbot01 ~]# yum -y install do ...

  8. 1829:【02NOIP提高组】自由落体

    #include<bits/stdc++.h> using namespace std; double h,s1,v,k,l; int n,ans; int main() { cin> ...

  9. ID生成算法(二)

    上一篇文章介绍了一种用雪花算法生成GUID的方法,下面介绍里外一种生成GUID并导出为.txt文件的方法: 话不多少 show you the code ! <!DOCTYPE html> ...

  10. c++ rapidjson读取json文件 解析

    库:链接:https://pan.baidu.com/s/1UChrgqLPJxKopyqShDCHjg  密码:3yhz #include <iostream> #include < ...