search-vector-tile-api.asciidoc 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. [[search-vector-tile-api]]
  2. === Vector tile search API
  3. ++++
  4. <titleabbrev>Vector tile search</titleabbrev>
  5. ++++
  6. Searches a vector tile for geospatial values. Returns results as a binary
  7. https://docs.mapbox.com/vector-tiles/specification[Mapbox vector tile].
  8. ////
  9. [source,console]
  10. ----
  11. PUT my-index
  12. {
  13. "mappings": {
  14. "properties": {
  15. "my-geo-field": {
  16. "type": "geo_point"
  17. }
  18. }
  19. }
  20. }
  21. PUT my-index/_doc/0?refresh
  22. {
  23. "my-geo-field": "37.3864953,-122.0863176"
  24. }
  25. ----
  26. ////
  27. [source,console]
  28. ----
  29. GET my-index/_mvt/my-geo-field/15/5271/12710
  30. ----
  31. // TEST[continued]
  32. [[search-vector-tile-api-request]]
  33. ==== {api-request-title}
  34. `GET <target>/_mvt/<field>/<zoom>/<x>/<y>`
  35. `POST <target>/_mvt/<field>/<zoom>/<x>/<y>`
  36. [[search-vector-tile-api-prereqs]]
  37. ==== {api-prereq-title}
  38. * Before using this API, you should be familiar with the
  39. https://github.com/mapbox/vector-tile-spec[Mapbox vector tile specification].
  40. * If the {es} {security-features} are enabled, you must have the `read`
  41. <<privileges-list-indices,index privilege>> for the target data stream, index,
  42. or alias. For cross-cluster search, see <<cross-cluster-configuring>>.
  43. [[search-vector-tile-api-path-params]]
  44. ==== {api-path-parms-title}
  45. `<target>`::
  46. (Required, string) Comma-separated list of data streams, indices, or aliases to
  47. search. Supports wildcards (`*`). To search all data streams and indices, omit
  48. this parameter or use `*` or `_all`.
  49. +
  50. To search a remote cluster, use the `<cluster>:<target>` syntax. See
  51. <<modules-cross-cluster-search>>.
  52. `<field>`::
  53. (Required, string) Field containing geospatial values to return. Must be a
  54. <<geo-point,`geo_point`>> or <<geo-shape,`geo_shape`>> field. The field must
  55. have <<doc-values,doc values>> enabled. Cannot be a nested field.
  56. +
  57. NOTE: Vector tiles do not natively support geometry collections. For
  58. `geometrycollection` values in a `geo_shape` field, the API returns a `hits`
  59. layer feature for each element of the collection. This behavior may change may
  60. change in a future release.
  61. `<zoom>`::
  62. (Required, integer) Zoom level for the vector tile to search. Accepts `0`-`29`.
  63. `<x>`::
  64. (Required, integer) X coordinate for the vector tile to search.
  65. `<y>`::
  66. (Required, integer) Y coordinate for the vector tile to search.
  67. [[search-vector-tile-api-desc]]
  68. ==== {api-description-title}
  69. Internally, {es} translates a vector tile search API request into a
  70. <<search-search,search>> containing:
  71. * A <<query-dsl-geo-bounding-box-query,`geo_bounding_box`>> query on the
  72. `<field>`. The query uses the `<zoom>/<x>/<y>` tile as a bounding box.
  73. * A <<search-aggregations-bucket-geotilegrid-aggregation,`geotile_grid`>>
  74. aggregation on the `<field>`. The aggregation uses the `<zoom>/<x>/<y>` tile as
  75. a bounding box.
  76. * Optionally, a
  77. <<search-aggregations-metrics-geobounds-aggregation,`geo_bounds`>> aggregation
  78. on the `<field>`. The search only includes this aggregation if the
  79. `exact_bounds` parameter is `true`.
  80. For example, {es} may translate a vector tile search API request with an
  81. `exact_bounds` argument of `true` into the following search:
  82. [source,console]
  83. ----
  84. GET my-index/_search
  85. {
  86. "size": 10000,
  87. "query": {
  88. "geo_bounding_box": {
  89. "my-geo-field": {
  90. "top_left": {
  91. "lat": -40.979898069620134,
  92. "lon": -45
  93. },
  94. "bottom_right": {
  95. "lat": -66.51326044311186,
  96. "lon": 0
  97. }
  98. }
  99. }
  100. },
  101. "aggregations": {
  102. "grid": {
  103. "geotile_grid": {
  104. "field": "my-geo-field",
  105. "precision": 11,
  106. "size": 65536,
  107. "bounds": {
  108. "top_left": {
  109. "lat": -40.979898069620134,
  110. "lon": -45
  111. },
  112. "bottom_right": {
  113. "lat": -66.51326044311186,
  114. "lon": 0
  115. }
  116. }
  117. }
  118. },
  119. "bounds": {
  120. "geo_bounds": {
  121. "field": "my-geo-field",
  122. "wrap_longitude": false
  123. }
  124. }
  125. }
  126. }
  127. ----
  128. // TEST[continued]
  129. The API returns results as a binary
  130. https://github.com/mapbox/vector-tile-spec[Mapbox vector tile]. Mapbox vector
  131. tiles are encoded as https://github.com/protocolbuffers/protobuf[Google
  132. Protobufs (PBF)]. By default, the tile contains three layers:
  133. * A `hits` layer containing a feature for each `<field>` value matching the
  134. `geo_bounding_box` query.
  135. * An `aggs` layer containing a feature for each cell of the `geotile_grid`. You
  136. can use these cells as tiles for lower zoom levels. The layer only contains
  137. features for cells with matching data.
  138. * A `meta` layer containing:
  139. ** A feature containing a bounding box. By default, this is the bounding box of
  140. the tile.
  141. ** Value ranges for any sub-aggregations on the `geotile_grid`.
  142. ** Metadata for the search.
  143. The API only returns features that can display at its zoom level. For example,
  144. if a polygon feature has no area at its zoom level, the API omits it.
  145. The API returns errors as UTF-8 encoded JSON.
  146. [[search-vector-tile-api-query-params]]
  147. ==== {api-query-parms-title}
  148. IMPORTANT: You can specify several options for this API as either a query
  149. parameter or request body parameter. If you specify both parameters, the query
  150. parameter takes precedence.
  151. // tag::exact-bounds[]
  152. `exact_bounds`::
  153. (Optional, Boolean)
  154. If `false`, the `meta` layer's feature is the bounding box of the tile. Defaults
  155. to `false`.
  156. +
  157. If `true`, the `meta` layer's feature is a bounding box resulting from a
  158. <<search-aggregations-metrics-geobounds-aggregation,`geo_bounds`>> aggregation.
  159. The aggregation runs on `<field>` values that intersect the `<zoom>/<x>/<y>`
  160. tile with `wrap_longitude` set to `false`. The resulting bounding box may be
  161. larger than the vector tile.
  162. // end::exact-bounds[]
  163. // tag::extent-param[]
  164. `extent`::
  165. (Optional, integer) Size, in pixels, of a side of the tile. Vector tiles are
  166. square with equal sides. Defaults to `4096`.
  167. // end::extent-param[]
  168. // tag::grid-precision[]
  169. `grid_precision`::
  170. (Optional, integer) Additional zoom levels available through the `aggs` layer.
  171. For example, if `<zoom>` is `7` and `grid_precision` is `8`, you can zoom in up to
  172. level 15. Accepts `0`-`8`. Defaults to `8`. If `0`, results don't include the
  173. `aggs` layer.
  174. +
  175. This value determines the grid size of the `geotile_grid` as follows:
  176. +
  177. `(2^grid_precision) x (2^grid_precision)`
  178. +
  179. For example, a value of `8` divides the tile into a grid of 256 x 256 cells. The
  180. `aggs` layer only contains features for cells with matching data.
  181. // end::grid-precision[]
  182. // tag::grid-type[]
  183. `grid_type`::
  184. (Optional, string) Determines the geometry type for features in the `aggs`
  185. layer. In the `aggs` layer, each feature represents a `geotile_grid` cell.
  186. Accepts:
  187. `grid` (Default):::
  188. Each feature is a `Polygon` of the cell's bounding box.
  189. `point`:::
  190. Each feature is a `Point` that's the centroid of the cell.
  191. `centroid`:::
  192. Each feature is a `Point` that's the centroid of the data within the cell. For
  193. complex geometries, the actual centroid may be outside the cell. In these cases,
  194. the feature is set to the closest point to the centroid inside the cell.
  195. // end::grid-type[]
  196. // tag::size[]
  197. `size`::
  198. (Optional, integer) Maximum number of features to return in the `hits` layer.
  199. Accepts `0`-`10000`. Defaults to `10000`. If `0`, results don't include the
  200. `hits` layer.
  201. // end::size[]
  202. // tag::track_total_hits[]
  203. `track_total_hits`::
  204. (Optional, integer or Boolean)
  205. Number of hits matching the query to count accurately. Defaults to `10000`.
  206. +
  207. If `true`, the exact number of hits is returned at the cost of some performance.
  208. If `false`, the response does not include the total number of hits matching the query.
  209. // end::track_total_hits[]
  210. [role="child_attributes"]
  211. [[search-vector-tile-api-request-body]]
  212. ==== {api-request-body-title}
  213. `aggs`::
  214. (Optional, <<search-aggregations,aggregation object>>)
  215. <<run-sub-aggs,Sub-aggregations>> for the `geotile_grid`. Supports the following
  216. aggregation types:
  217. +
  218. * <<search-aggregations-metrics-avg-aggregation,`avg`>>
  219. * <<search-aggregations-metrics-boxplot-aggregation,`boxplot`>>
  220. * <<search-aggregations-metrics-cardinality-aggregation,`cardinality`>>
  221. * <<search-aggregations-metrics-extendedstats-aggregation,`extended stats`>>
  222. * <<search-aggregations-metrics-max-aggregation,`max`>>
  223. * <<search-aggregations-metrics-median-absolute-deviation-aggregation,`median absolute deviation`>>
  224. * <<search-aggregations-metrics-min-aggregation,`min`>>
  225. * <<search-aggregations-metrics-percentile-aggregation,`percentile`>>
  226. * <<search-aggregations-metrics-percentile-rank-aggregation,`percentile-rank`>>
  227. * <<search-aggregations-metrics-stats-aggregation,`stats`>>
  228. * <<search-aggregations-metrics-sum-aggregation,`sum`>>
  229. * <<search-aggregations-metrics-valuecount-aggregation,`value count`>>
  230. +
  231. The aggregation names can't start with `_mvt_`. The `_mvt_` prefix is reserved
  232. for internal aggregations.
  233. include::search-vector-tile-api.asciidoc[tag=exact-bounds]
  234. include::search-vector-tile-api.asciidoc[tag=extent-param]
  235. `fields`::
  236. (Optional, array of strings and objects) Fields to return in the `hits` layer.
  237. Supports wildcards (`*`).
  238. +
  239. This parameter does not support fields with <<array,array values>>. Fields with
  240. array values may return inconsistent results.
  241. +
  242. You can specify fields in the array as a string or object.
  243. +
  244. .Properties of `fields` objects
  245. [%collapsible%open]
  246. ====
  247. include::search.asciidoc[tag=fields-param-props]
  248. ====
  249. include::search-vector-tile-api.asciidoc[tag=grid-precision]
  250. include::search-vector-tile-api.asciidoc[tag=grid-type]
  251. `query`::
  252. (Optional, object) <<query-dsl,Query DSL>> used to filter documents for the
  253. search.
  254. include::{es-repo-dir}/search/search.asciidoc[tag=runtime-mappings-def]
  255. include::search-vector-tile-api.asciidoc[tag=size]
  256. `sort`::
  257. (Optional, array of <<sort-search-results,sort objects>>) Sorts features in the
  258. `hits` layer.
  259. +
  260. By default, the API calculates a bounding box for each feature. It sorts
  261. features based on this box's diagonal length, from longest to shortest.
  262. include::search-vector-tile-api.asciidoc[tag=track_total_hits]
  263. [role="child_attributes"]
  264. [[search-vector-tile-api-response]]
  265. ==== Response
  266. Returned vector tiles contain the following data:
  267. `hits`::
  268. (object) Layer containing results for the `geo_bounding_box` query.
  269. +
  270. .Properties of `hits`
  271. [%collapsible%open]
  272. ====
  273. // tag::extent[]
  274. `extent`::
  275. (integer) Size, in pixels, of a side of the tile. Vector tiles are square with
  276. equal sides.
  277. // end::extent[]
  278. // tag::version[]
  279. `version`::
  280. (integer) Major version number of the
  281. https://github.com/mapbox/vector-tile-spec[Mapbox vector tile specification].
  282. // end::version[]
  283. `features`::
  284. (array of objects) Array of features. Contains a feature for each `<field>`
  285. value that matches the `geo_bounding_box` query.
  286. +
  287. .Properties of `features` objects
  288. [%collapsible%open]
  289. =====
  290. // tag::geometry[]
  291. `geometry`::
  292. (object) Geometry for the feature.
  293. +
  294. .Properties of `geometry`
  295. [%collapsible%open]
  296. ======
  297. `type`::
  298. (string) Geometry type for the feature. Valid values are:
  299. * `UNKNOWN`
  300. * `POINT`
  301. * `LINESTRING`
  302. * `POLYGON`
  303. `coordinates`::
  304. (array of integers or array of arrays) Tile coordinates for the feature.
  305. ======
  306. // end::geometry[]
  307. `properties`::
  308. (object) Properties for the feature.
  309. +
  310. .Properties of `properties`
  311. [%collapsible%open]
  312. ======
  313. `_id`::
  314. (string) Document `_id` for the feature's document.
  315. `_index`::
  316. (string) Name of the index for the feature's document.
  317. `<field>`::
  318. Field value. Only returned for fields in the `fields` parameter.
  319. ======
  320. // tag::feature-id[]
  321. `id`::
  322. (integer) Unique ID for the feature within the layer.
  323. // end::feature-id[]
  324. // tag::feature-type[]
  325. `type`::
  326. (integer) Identifier for the feature's geometry type. Values are:
  327. +
  328. * `1` (`POINT`)
  329. * `2` (`LINESTRING`)
  330. * `3` (`POLYGON`)
  331. // end::feature-type[]
  332. =====
  333. ====
  334. `aggs`::
  335. (object) Layer containing results for the `geotile_grid` aggregation and its
  336. sub-aggregations.
  337. +
  338. .Properties of `aggs`
  339. [%collapsible%open]
  340. ====
  341. include::search-vector-tile-api.asciidoc[tag=extent]
  342. include::search-vector-tile-api.asciidoc[tag=version]
  343. `features`::
  344. (array of objects) Array of features. Contains a feature for each cell of the
  345. `geotile_grid`.
  346. +
  347. .Properties of `features` objects
  348. [%collapsible%open]
  349. =====
  350. include::search-vector-tile-api.asciidoc[tag=geometry]
  351. `properties`::
  352. (object) Properties for the feature.
  353. +
  354. .Properties of `properties`
  355. [%collapsible%open]
  356. ======
  357. `_count`::
  358. (long) Count of the cell's documents.
  359. `_key`::
  360. (string) Bucket key of the cell in the format `<zoom>/<x>/<y>`.
  361. `<sub-aggregation>.value`::
  362. Sub-aggregation results for the cell. Only returned for sub-aggregations in the
  363. `aggs` parameter.
  364. ======
  365. include::search-vector-tile-api.asciidoc[tag=feature-id]
  366. include::search-vector-tile-api.asciidoc[tag=feature-type]
  367. =====
  368. ====
  369. `meta`::
  370. (object) Layer containing metadata for the request.
  371. +
  372. .Properties of `meta`
  373. [%collapsible%open]
  374. ====
  375. include::search-vector-tile-api.asciidoc[tag=extent]
  376. include::search-vector-tile-api.asciidoc[tag=version]
  377. `features`::
  378. (array of objects) Contains a feature for a bounding box.
  379. +
  380. .Properties of `features` objects
  381. [%collapsible%open]
  382. =====
  383. include::search-vector-tile-api.asciidoc[tag=geometry]
  384. `properties`::
  385. (object) Properties for the feature.
  386. +
  387. .Properties of `properties`
  388. [%collapsible%open]
  389. ======
  390. `_shards.failed`::
  391. (integer) Number of shards that failed to execute the search. See the search
  392. API's <<search-api-shards,`shards`>> response property.
  393. `_shards.skipped`::
  394. (integer) Number of shards that skipped the search. See the search
  395. API's <<search-api-shards,`shards`>> response property.
  396. `_shards.successful`::
  397. (integer) Number of shards that executed the search successfully. See the
  398. search API's <<search-api-shards,`shards`>> response property.
  399. `_shards.total`::
  400. (integer) Total number of shards that required querying, including unallocated
  401. shards. See the search API's <<search-api-shards,`shards`>> response property.
  402. `aggregations._count.avg`::
  403. (float) Average `_count` value for features in the `aggs` layer.
  404. `aggregations._count.count`::
  405. (integer) Number of unique `_count` values for features in the `aggs` layer.
  406. `aggregations._count.max`::
  407. (float) Largest `_count` value for features in the `aggs` layer.
  408. `aggregations._count.min`::
  409. (float) Smallest `_count` value for features in the `aggs` layer.
  410. `aggregations._count.sum`::
  411. (float) Sum of `_count` values for features in the `aggs` layer.
  412. `aggregations.<sub-aggregation>.avg`::
  413. (float) Average value for the sub-aggregation's results.
  414. `aggregations.<agg_name>.count`::
  415. (integer) Number of unique values from the sub-aggregation's results.
  416. `aggregations.<agg_name>.max`::
  417. (float) Largest value from the sub-aggregation's results.
  418. `aggregations.<agg_name>.min`::
  419. (float) Smallest value from the sub-aggregation's results.
  420. `aggregations.<agg_name>.sum`::
  421. (float) Sum of values for the sub-aggregation's results.
  422. `hits.max_score`::
  423. (float) Highest document `_score` for the search's hits.
  424. `hits.total.relation`::
  425. (string) Indicates whether `hits.total.value` is accurate or a lower bound.
  426. Possible values are:
  427. `eq`::: Accurate
  428. `gte`::: Lower bound
  429. `hits.total.value`::
  430. (integer) Total number of hits for the search.
  431. `timed_out`::
  432. (Boolean) If `true`, the search timed out before completion. Results may be
  433. partial or empty.
  434. `took`::
  435. (integer) Milliseconds it took {es} to run the search. See the search API's
  436. <<search-api-took,`took`>> response property.
  437. ======
  438. include::search-vector-tile-api.asciidoc[tag=feature-id]
  439. include::search-vector-tile-api.asciidoc[tag=feature-type]
  440. =====
  441. ====
  442. [[search-vector-tile-api-api-example]]
  443. ==== {api-examples-title}
  444. The following requests create the `museum` index and add several geospatial
  445. `location` values.
  446. [source,console]
  447. ----
  448. PUT museums
  449. {
  450. "mappings": {
  451. "properties": {
  452. "location": {
  453. "type": "geo_point"
  454. },
  455. "name": {
  456. "type": "keyword"
  457. },
  458. "price": {
  459. "type": "long"
  460. },
  461. "included": {
  462. "type": "boolean"
  463. }
  464. }
  465. }
  466. }
  467. POST museums/_bulk?refresh
  468. { "index": { "_id": "1" } }
  469. { "location": "52.374081,4.912350", "name": "NEMO Science Museum", "price": 1750, "included": true }
  470. { "index": { "_id": "2" } }
  471. { "location": "52.369219,4.901618", "name": "Museum Het Rembrandthuis", "price": 1500, "included": false }
  472. { "index": { "_id": "3" } }
  473. { "location": "52.371667,4.914722", "name": "Nederlands Scheepvaartmuseum", "price":1650, "included": true }
  474. { "index": { "_id": "4" } }
  475. { "location": "52.371667,4.914722", "name": "Amsterdam Centre for Architecture", "price":0, "included": true }
  476. ----
  477. The following request searches the index for `location` values that intersect
  478. the `13/4207/2692` vector tile.
  479. [source,console]
  480. ----
  481. GET museums/_mvt/location/13/4207/2692
  482. {
  483. "grid_precision": 2,
  484. "fields": [
  485. "name",
  486. "price"
  487. ],
  488. "query": {
  489. "term": {
  490. "included": true
  491. }
  492. },
  493. "aggs": {
  494. "min_price": {
  495. "min": {
  496. "field": "price"
  497. }
  498. },
  499. "max_price": {
  500. "max": {
  501. "field": "price"
  502. }
  503. },
  504. "avg_price": {
  505. "avg": {
  506. "field": "price"
  507. }
  508. }
  509. }
  510. }
  511. ----
  512. // TEST[continued]
  513. The API returns results as a binary vector tile. When decoded into JSON, the
  514. tile contains the following data:
  515. [source,js]
  516. ----
  517. {
  518. "hits": {
  519. "extent": 4096,
  520. "version": 2,
  521. "features": [
  522. {
  523. "geometry": {
  524. "type": "Point",
  525. "coordinates": [
  526. 3208,
  527. 3864
  528. ]
  529. },
  530. "properties": {
  531. "_id": "1",
  532. "_index": "museums",
  533. "name": "NEMO Science Museum",
  534. "price": 1750
  535. },
  536. "id": 0,
  537. "type": 1
  538. },
  539. {
  540. "geometry": {
  541. "type": "Point",
  542. "coordinates": [
  543. 3429,
  544. 3496
  545. ]
  546. },
  547. "properties": {
  548. "_id": "3",
  549. "_index": "museums",
  550. "name": "Nederlands Scheepvaartmuseum",
  551. "price": 1650
  552. },
  553. "id": 0,
  554. "type": 1
  555. },
  556. {
  557. "geometry": {
  558. "type": "Point",
  559. "coordinates": [
  560. 3429,
  561. 3496
  562. ]
  563. },
  564. "properties": {
  565. "_id": "4",
  566. "_index": "museums",
  567. "name": "Amsterdam Centre for Architecture",
  568. "price": 0
  569. },
  570. "id": 0,
  571. "type": 1
  572. }
  573. ]
  574. },
  575. "aggs": {
  576. "extent": 4096,
  577. "version": 2,
  578. "features": [
  579. {
  580. "geometry": {
  581. "type": "Polygon",
  582. "coordinates": [
  583. [
  584. [
  585. 3072,
  586. 3072
  587. ],
  588. [
  589. 4096,
  590. 3072
  591. ],
  592. [
  593. 4096,
  594. 4096
  595. ],
  596. [
  597. 3072,
  598. 4096
  599. ],
  600. [
  601. 3072,
  602. 3072
  603. ]
  604. ]
  605. ]
  606. },
  607. "properties": {
  608. "_count": 3,
  609. "max_price.value": 1750.0,
  610. "min_price.value": 0.0,
  611. "avg_price.value": 1133.3333333333333
  612. },
  613. "id": 0,
  614. "type": 3
  615. }
  616. ]
  617. },
  618. "meta": {
  619. "extent": 4096,
  620. "version": 2,
  621. "features": [
  622. {
  623. "geometry": {
  624. "type": "Polygon",
  625. "coordinates": [
  626. [
  627. [
  628. 0,
  629. 0
  630. ],
  631. [
  632. 4096,
  633. 0
  634. ],
  635. [
  636. 4096,
  637. 4096
  638. ],
  639. [
  640. 0,
  641. 4096
  642. ],
  643. [
  644. 0,
  645. 0
  646. ]
  647. ]
  648. ]
  649. },
  650. "properties": {
  651. "_shards.failed": 0,
  652. "_shards.skipped": 0,
  653. "_shards.successful": 1,
  654. "_shards.total": 1,
  655. "aggregations._count.avg": 3.0,
  656. "aggregations._count.count": 1,
  657. "aggregations._count.max": 3.0,
  658. "aggregations._count.min": 3.0,
  659. "aggregations._count.sum": 3.0,
  660. "aggregations.avg_price.avg": 1133.3333333333333,
  661. "aggregations.avg_price.count": 1,
  662. "aggregations.avg_price.max": 1133.3333333333333,
  663. "aggregations.avg_price.min": 1133.3333333333333,
  664. "aggregations.avg_price.sum": 1133.3333333333333,
  665. "aggregations.max_price.avg": 1750.0,
  666. "aggregations.max_price.count": 1,
  667. "aggregations.max_price.max": 1750.0,
  668. "aggregations.max_price.min": 1750.0,
  669. "aggregations.max_price.sum": 1750.0,
  670. "aggregations.min_price.avg": 0.0,
  671. "aggregations.min_price.count": 1,
  672. "aggregations.min_price.max": 0.0,
  673. "aggregations.min_price.min": 0.0,
  674. "aggregations.min_price.sum": 0.0,
  675. "hits.max_score": 0.0,
  676. "hits.total.relation": "eq",
  677. "hits.total.value": 3,
  678. "timed_out": false,
  679. "took": 2
  680. },
  681. "id": 0,
  682. "type": 3
  683. }
  684. ]
  685. }
  686. }
  687. ----
  688. // NOTCONSOLE