接口

http://localhost:4080/es/olympics/_search

  1. {
  2. "query": {
  3. "bool": {
  4. "must": [
  5. { "match": { "City": "paris" }},
  6. { "match": { "Medal": "gold" }}
  7. ],
  8. "should": [],
  9. "must_not": [],
  10. "filter": [
  11. { "term": { "Country": "ger" }},
  12. { "range": { "@timestamp": { "gte": "2015-01-01", "format": "2006-01-02" }}}
  13. ]
  14. }
  15. },
  16. "size": 10
  17. }

响应

  1. {
  2. "took": 0,
  3. "timed_out": false,
  4. "_shards": {
  5. "total": 1,
  6. "successful": 1,
  7. "skipped": 0,
  8. "failed": 0
  9. },
  10. "hits": {
  11. "total": {
  12. "value": 11
  13. },
  14. "max_score": 12.214994762453479,
  15. "hits": [
  16. {
  17. "_index": "olympics",
  18. "_type": "_doc",
  19. "_id": "1P0sQ6wY926",
  20. "_score": 12.214994762453479,
  21. "@timestamp": "2022-05-26T11:51:31.761150823Z",
  22. "_source": {
  23. "Athlete": "HOPPENBERG, Ernst",
  24. "City": "Paris",
  25. "Country": "GER",
  26. "Discipline": "Swimming",
  27. "Event": "200M Backstroke",
  28. "Gender": "Men",
  29. "Medal": "Gold",
  30. "Season": "summer",
  31. "Sport": "Aquatics",
  32. "Year": 1900
  33. }
  34. },
  35. {
  36. "_index": "olympics",
  37. "_type": "_doc",
  38. "_id": "1P0sQ6wY92j",
  39. "_score": 12.214994762453479,
  40. "@timestamp": "2022-05-26T11:51:31.761346257Z",
  41. "_source": {
  42. "Athlete": "FREY, Julius",
  43. "City": "Paris",
  44. "Country": "GER",
  45. "Discipline": "Swimming",
  46. "Event": "200M Team Swimming",
  47. "Gender": "Men",
  48. "Medal": "Gold",
  49. "Season": "summer",
  50. "Sport": "Aquatics",
  51. "Year": 1900
  52. }
  53. },
  54. {
  55. "_index": "olympics",
  56. "_type": "_doc",
  57. "_id": "1P0sQ6wY92k",
  58. "_score": 12.214994762453479,
  59. "@timestamp": "2022-05-26T11:51:31.761361703Z",
  60. "_source": {
  61. "Athlete": "HAINLE, Max",
  62. "City": "Paris",
  63. "Country": "GER",
  64. "Discipline": "Swimming",
  65. "Event": "200M Team Swimming",
  66. "Gender": "Men",
  67. "Medal": "Gold",
  68. "Season": "summer",
  69. "Sport": "Aquatics",
  70. "Year": 1900
  71. }
  72. },
  73. {
  74. "_index": "olympics",
  75. "_type": "_doc",
  76. "_id": "1P0sQ6wY92l",
  77. "_score": 12.214994762453479,
  78. "@timestamp": "2022-05-26T11:51:31.761376725Z",
  79. "_source": {
  80. "Athlete": "HOPPENBERG, Ernst",
  81. "City": "Paris",
  82. "Country": "GER",
  83. "Discipline": "Swimming",
  84. "Event": "200M Team Swimming",
  85. "Gender": "Men",
  86. "Medal": "Gold",
  87. "Season": "summer",
  88. "Sport": "Aquatics",
  89. "Year": 1900
  90. }
  91. },
  92. {
  93. "_index": "olympics",
  94. "_type": "_doc",
  95. "_id": "1P0sQ6wY92m",
  96. "_score": 12.214994762453479,
  97. "@timestamp": "2022-05-26T11:51:31.761388544Z",
  98. "_source": {
  99. "Athlete": "SCHÖNE, Max",
  100. "City": "Paris",
  101. "Country": "GER",
  102. "Discipline": "Swimming",
  103. "Event": "200M Team Swimming",
  104. "Gender": "Men",
  105. "Medal": "Gold",
  106. "Season": "summer",
  107. "Sport": "Aquatics",
  108. "Year": 1900
  109. }
  110. },
  111. {
  112. "_index": "olympics",
  113. "_type": "_doc",
  114. "_id": "1P0sQ6wY92n",
  115. "_score": 12.214994762453479,
  116. "@timestamp": "2022-05-26T11:51:31.761400515Z",
  117. "_source": {
  118. "Athlete": "VON PETERSDORFF, Herbert",
  119. "City": "Paris",
  120. "Country": "GER",
  121. "Discipline": "Swimming",
  122. "Event": "200M Team Swimming",
  123. "Gender": "Men",
  124. "Medal": "Gold",
  125. "Season": "summer",
  126. "Sport": "Aquatics",
  127. "Year": 1900
  128. }
  129. },
  130. {
  131. "_index": "olympics",
  132. "_type": "_doc",
  133. "_id": "1P0sQ6yo8GQ",
  134. "_score": 12.214994762453479,
  135. "@timestamp": "2022-05-26T11:51:31.766849311Z",
  136. "_source": {
  137. "Athlete": "GOSSLER, Carl Heinrich",
  138. "City": "Paris",
  139. "Country": "GER",
  140. "Discipline": "Rowing",
  141. "Event": "Four-Oared Shell With Coxswain (4-)",
  142. "Gender": "Men",
  143. "Medal": "Gold",
  144. "Season": "summer",
  145. "Sport": "Rowing",
  146. "Year": 1900
  147. }
  148. },
  149. {
  150. "_index": "olympics",
  151. "_type": "_doc",
  152. "_id": "1P0sQ6yo8GR",
  153. "_score": 12.214994762453479,
  154. "@timestamp": "2022-05-26T11:51:31.766876413Z",
  155. "_source": {
  156. "Athlete": "GOSSLER, Gustav Ludwig",
  157. "City": "Paris",
  158. "Country": "GER",
  159. "Discipline": "Rowing",
  160. "Event": "Four-Oared Shell With Coxswain (4-)",
  161. "Gender": "Men",
  162. "Medal": "Gold",
  163. "Season": "summer",
  164. "Sport": "Rowing",
  165. "Year": 1900
  166. }
  167. },
  168. {
  169. "_index": "olympics",
  170. "_type": "_doc",
  171. "_id": "1P0sQ6yo8GS",
  172. "_score": 12.214994762453479,
  173. "@timestamp": "2022-05-26T11:51:31.766898831Z",
  174. "_source": {
  175. "Athlete": "GOSSLER, Oscar",
  176. "City": "Paris",
  177. "Country": "GER",
  178. "Discipline": "Rowing",
  179. "Event": "Four-Oared Shell With Coxswain (4-)",
  180. "Gender": "Men",
  181. "Medal": "Gold",
  182. "Season": "summer",
  183. "Sport": "Rowing",
  184. "Year": 1900
  185. }
  186. },
  187. {
  188. "_index": "olympics",
  189. "_type": "_doc",
  190. "_id": "1P0sQ6yo8GU",
  191. "_score": 12.214994762453479,
  192. "@timestamp": "2022-05-26T11:51:31.766954511Z",
  193. "_source": {
  194. "Athlete": "KATZENSTEIN, Walther",
  195. "City": "Paris",
  196. "Country": "GER",
  197. "Discipline": "Rowing",
  198. "Event": "Four-Oared Shell With Coxswain (4-)",
  199. "Gender": "Men",
  200. "Medal": "Gold",
  201. "Season": "summer",
  202. "Sport": "Rowing",
  203. "Year": 1900
  204. }
  205. }
  206. ]
  207. },
  208. "error": ""
  209. }