Vector tiles buffer is used to include data that is just outside of the tile. This data is used to prevent border effects when rendering the geometries. It is currently [hardcoded to 5 pixels](https://github.com/elastic/elasticsearch/blob/de2781f98696c1e6cfad2b5bf46fe752a5e3edbb/x-pack/plugin/vector-tile/src/main/java/org/elasticsearch/xpack/vectortile/feature/FeatureFactory.java#L63) but it should probably need to be user configurable by adding a new property on the vector tiles API which can change the value.




x-pack/plugin/vector-tile/src/main/java/org/elasticsearch/xpack/vectortile/rest/VectorTileRequest.java
if (restRequest.paramAsBoolean(SearchSourceBuilder.TRACK_TOTAL_HITS_FIELD.getPreferredName(), true)) {
                    request.setTrackTotalHitsUpTo(TRACK_TOTAL_HITS_ACCURATE);
                } else {
                    request.setTrackTotalHitsUpTo(TRACK_TOTAL_HITS_DISABLED);
                }
            } else {
                request.setTrackTotalHitsUpTo(
                    restRequest.paramAsInt(SearchSourceBuilder.TRACK_TOTAL_HITS_FIELD.getPreferredName(), DEFAULT_TRACK_TOTAL_HITS_UP_TO)
                );
            }
        }
        return request;
    }
    private static final String SCRIPT = ""
        + "ScriptDocValues.Geometry geometry = doc[params."
        + FIELD_PARAM
        + "];"
        + "double w = geometry.getMercatorWidth();"
        + "double h = geometry.getMercatorHeight();"
        + "return h * h + w * w;";
    private final String[] indexes;
    private final String field;
    private final int x;
    private final int y;
    private final int z;
    private final Rectangle bbox;
    private QueryBuilder queryBuilder = Defaults.QUERY;
    private Map<String, Object> runtimeMappings = Defaults.RUNTIME_MAPPINGS;
    private int gridPrecision = Defaults.GRID_PRECISION;
    private GridAggregation gridAgg = Defaults.GRID_AGG;