Vector Tile API: Updated mvt_sample error

The latest update to the mvt_sample throws this ResponseError: x_content_parse_exception: [x_content_parse_exception] Reason: [1:36] [vector-tile] unknown field [grid_agg] did you mean [grid_type]? If the grid_agg field is removed, the sample code works for the hits layer. Is the grid_agg field a new component for the upcoming v8.2 geohex grid option that does not work in the current version? Also curios as to why the mvt_sample uses the older "@elastic/Elasticsearch": "^7.15.0" client. The latest 8.1 version has many breaking changes. It would be helpful to have an example of the latest client using the geohex grid. Thanks

Hi Joe,

This PR changed the demo code to work with this change in the upcoming Elasticsearch 8.2.0 release. So the demo in the main branch is not compatible with older versions.

Also curios as to why the mvt_sample uses the older "@elastic/Elasticsearch": "^7.15.0" client. The latest 8.1 version has many breaking changes. It would be helpful to have an example of the latest client using the geohex grid.

Good point! I've opened a PR to update it to the latest 8.1.0 Elasticsearch client which should still work with Elasticsearch 8.2.0. But we should update the client release to 8.2.0 once it is available.

1 Like

thanks. great to see the hexgrid in action

1 Like