search-vector-tile-api.asciidoc 21 KB

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