Type to search.

stack es search-mvt cli command

Serverless Preview

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Preview

    This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply.

Serverless interfaces and procedures might differ from classic Elastic Stack deployments.

Stack Preview

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Preview

    This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Auth required
Shell
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

--index string required

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 --index multiple times to supply more than one value

--field string required
A field that contains the geospatial data to return. It must be a geo_point or geo_shape field. The field must have doc values enabled. It cannot be a nested field. NOTE: Vector tiles do not natively support geometry collections. For geometrycollection values in a geo_shape field, the API returns a hits layer feature for each element of the collection. This behavior may change in a future release.
--zoom number required
The zoom level of the vector tile to search. It accepts 0 to 29.
--x number required
The X coordinate for the vector tile to search.
--y number required
The Y coordinate for the vector tile to search.
--exact-bounds
If false, the meta layer's feature is the bounding box of the tile. If true, the meta layer's feature is a bounding box resulting from a geo_bounds aggregation. The aggregation runs on <field> values that intersect the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting bounding box may be larger than the vector tile.
--extent number
The size, in pixels, of a side of the tile. Vector tiles are square with equal sides.
--grid-agg enum

The aggregation used to create a grid for the field.

Values: geotile, geohex

--grid-precision number
Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results don't include the aggs layer.
--grid-type enum

Determines the geometry type for features in the aggs layer. In the aggs layer, each feature represents a geotile_grid cell. If grid, each feature is a polygon of the cells bounding box. If point`, each feature is a Point that is the centroid of the cell.

Values: grid, point, centroid

--size number
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-hits number
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. If false, the response does not include the total number of hits matching the query.
--with-labels

If true, the hits and aggs layers will contain additional point features representing suggested label positions for the original features. * Point and MultiPoint features will have one of the points selected.

  • Polygon and MultiPolygon features 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.
  • LineString features 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.
--aggs string

Sub-aggregations for the geotile_grid. It supports the following aggregation types: - avg

  • boxplot
  • cardinality
  • extended stats
  • max
  • median absolute deviation
  • min
  • percentile
  • percentile-rank
  • stats
  • sum
  • value count The aggregation names can't start with _mvt_. The _mvt_ prefix is reserved for internal aggregations.
--buffer number
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.
--fields string

The fields to return in the hits layer. It supports wildcards (*). This parameter does not support fields with array values. Fields with array values may return inconsistent results.

Repeatable: pass --fields multiple times to supply more than one value

--query string
The query DSL used to filter documents for the search.
--runtime-mappings string
Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.
--sort string

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 --sort multiple times to supply more than one value

--error-trace
When set to true Elasticsearch will include the full stack trace of errors when they occur.
--filter-path string

Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

Repeatable: pass --filter-path multiple times to supply more than one value

--human
When set to true will return statistics in a format suitable for humans. For example "exists_time": "1h" for humans and "exists_time_in_millis": 3600000 for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.
--pretty
If set to true the returned JSON will be "pretty-formatted". Only use this option for debugging only.
--input-file string
path to a JSON file to use as command input
--dry-run
validate all inputs and exit without performing any action (preview changes without applying them)
--no-validate
skip input validation and send the request as-is
--output-fields string
comma-separated list of fields to include in output (dot-notation supported)
--output-template string
Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
--json

output as JSON