Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] Using max_result_window to set up MVT size request leads to not…
… showing all results (elastic#171344) Closes elastic#170272 The cause of the problem is that Maps is not setting [_mvt](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html) `size` parameter. Lets illustrate the problem with an example. * index.max_result_window is set to 20,000. * There are 15,000 hits matching the query for the tile, but because `size` is not provided, the tile returns the default size value of 10,000 hits. * Tile request sets `track_total_hits` to 20,001. Tile meta returns `"hits.total.relation": "eq"` and `"hits.total.value": 15000` properties, indicating that all possible hits are returned in the tile. * Maps UI does not display "incomplete results" even though 5000 hits are not contained in the tile. * This happens because `hits.total` properties from tile meta is used to indicate "incomplete results" and the returned value indicates that all results are contained in the tile. We know this is not true because the tile actually only returned 10,000 hits and not all 15,000 matching hits. Thus, without setting `size`, the tile is not returning all of the hits indicated by `track_total_hits`. ### test instructions 1. install web logs sample data set 2. In dev tools, run the following ``` POST kibana_sample_data_logs/_doc/ { "geo": { "coordinates": "59,-106.5" }, "@timestamp": "2023-08-01" } PUT /kibana_sample_data_logs/_settings { "index" : { "max_result_window" : 20000 } } ``` 3. Create new map 4. Set time range to `1 year ago to 1 year from now` to display all web logs data 5. add documents layer. Verify point circled in image is displayed. Without changes, this point would not be returned in the tile because the tile would only return the first 10000 matches. <img width="500" alt="Screenshot 2023-11-15 at 11 31 25 AM" src="https://github.com/elastic/kibana/assets/373691/2249d571-24c4-41ad-975e-d44ee6d246ce">
- Loading branch information