stack es search-mvt cli command
elastic stack es search-mvt \
--index <index> \
--field <field> \
--zoom <zoom> \
--x <x> \
--y <y> \
[options]
Search a vector tile.
Behaviour flags:
--dry-run — validate all inputs and exit without performing any action
--indexstringrequired-
A list of indices, data streams, or aliases to search. It supports wildcards (
*). To search all data streams and indices, omit this parameter or use*or_all. To search a remote cluster, use the<cluster>:<target>syntax.Repeatable: pass
--indexmultiple times to supply more than one value --fieldstringrequired- A field that contains the geospatial data to return.
It must be a
geo_pointorgeo_shapefield. The field must have doc values enabled. It cannot be a nested field. NOTE: Vector tiles do not natively support geometry collections. Forgeometrycollectionvalues in ageo_shapefield, the API returns a hits layer feature for each element of the collection. This behavior may change in a future release. --zoomnumberrequired- The zoom level of the vector tile to search. It accepts
0to29. --xnumberrequired- The X coordinate for the vector tile to search.
--ynumberrequired- The Y coordinate for the vector tile to search.
--[no-]exact-bounds- If
false, the meta layer's feature is the bounding box of the tile. Iftrue, the meta layer's feature is a bounding box resulting from ageo_boundsaggregation. The aggregation runs on <field> values that intersect the<zoom>/<x>/<y>tile withwrap_longitudeset tofalse. The resulting bounding box may be larger than the vector tile. --extentnumber- The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.
--grid-aggenum-
The aggregation used to create a grid for the
field.Values: geotile, geohex
--grid-precisionnumber- Additional zoom levels available through the aggs layer. For example, if
<zoom>is7andgrid_precisionis8, you can zoom in up to level 15. Accepts 0-8. If 0, results don't include the aggs layer. --grid-typeenum-
Determines the geometry type for features in the aggs layer. In the aggs layer, each feature represents a
geotile_gridcell. Ifgrid, each feature is a polygon of the cells bounding box. Ifpoint`, each feature is a Point that is the centroid of the cell.Values: grid, point, centroid
--sizenumber- The maximum number of features to return in the hits layer. Accepts 0-10000. If 0, results don't include the hits layer.
--track-total-hitsnumber- The number of hits matching the query to count accurately. If
true, the exact number of hits is returned at the cost of some performance. Iffalse, the response does not include the total number of hits matching the query. --[no-]with-labels-
If
true, the hits and aggs layers will contain additional point features representing suggested label positions for the original features. *PointandMultiPointfeatures will have one of the points selected.PolygonandMultiPolygonfeatures will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.LineStringfeatures will likewise provide a roughly central point selected from the triangle-tree.- The aggregation results will provide one central point for each aggregation bucket. All attributes from the original features will also be copied to the new label features.
In addition, the new features will be distinguishable using the tag
_mvt_label_position.
--aggsstring-
Sub-aggregations for the geotile_grid. It supports the following aggregation types: -
avgboxplotcardinalityextended statsmaxmedian absolute deviationminpercentilepercentile-rankstatssumvalue countThe aggregation names can't start with_mvt_. The_mvt_prefix is reserved for internal aggregations.
--buffernumber- The size, in pixels, of a clipping buffer outside the tile. This allows renderers to avoid outline artifacts from geometries that extend past the extent of the tile.
--fieldsstring-
The fields to return in the
hitslayer. It supports wildcards (*). This parameter does not support fields with array values. Fields with array values may return inconsistent results.Repeatable: pass
--fieldsmultiple times to supply more than one value --querystring- The query DSL used to filter documents for the search.
--runtime-mappingsstring- Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.
--sortstring-
Sort the features in the hits layer. By default, the API calculates a bounding box for each feature. It sorts features based on this box's diagonal length, from longest to shortest.
Repeatable: pass
--sortmultiple times to supply more than one value --[no-]error-trace- When set to
trueElasticsearch will include the full stack trace of errors when they occur. --filter-pathstring-
Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.
Repeatable: pass
--filter-pathmultiple times to supply more than one value --[no-]human- When set to
truewill return statistics in a format suitable for humans. For example"exists_time": "1h"for humans and"exists_time_in_millis": 3600000for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. --[no-]pretty- If set to
truethe returned JSON will be "pretty-formatted". Only use this option for debugging only. --input-filestring- path to a JSON file to use as command input
--[no-]dry-run- validate all inputs and exit without performing any action (preview changes without applying them)
--[no-]json-
output as JSON