mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
## Summary ### Notes for reviewers - Currently, autocomplete suggestions for fields don't work with wildcards and data streams due to the [bug](https://github.com/elastic/kibana/issues/149496) in the `main`. It should be addressed separately. ### How to test In order to spot the loading behaviour, ideally you should create an index with a heavy mappings definition. Afterwards, write a query that requires a field from this index, e.g.: ``` GET <my-index>/_search { "aggs": { "my_agg": { "terms": { "field": "", "size": 10 } } } } ``` Place a cursor next to the `field` property, it should trigger mappings fetch. After that, the mappings definition for this index will be cached and accessed synchronously. You can also open the browser's dev tools and enable Network throttling. It allows noticing loading behaviour for any index. -------------------- Resolves https://github.com/elastic/kibana/issues/146855 Instead of fetching all mappings upfront, requests mapping definition on demand per index according to the cursor position. Considering there is a maximum response size limit of 10MB in the `/autocomplete_entities` endpoint, field autocompletion wasn't working at all if the overall mappings definition exceeded this size. Retrieving mappings per index tackles this and improves the init time.  ### Checklist - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com> |
||
---|---|---|
.. | ||
autocomplete_entities.ts | ||
index.ts | ||
proxy_route.ts |