We have various places where we use custom code to identify populated fields of an index by getting a random sample of docs and then check which fields are populated. These queries use random_score which can be a heavy query. We should migrate to the new field caps option which will be available as of 8.13.
plugins/ml
[ ] x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts
Code that identifies populated fields for data grid.
[ ] x-pack/plugins/transform/public/app/hooks/use_index_data.ts
Code that identifies populated fields for data grid.
plugins/data_visualizer
[x] x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts
Code that identifies if fields are empty or not. https://github.com/elastic/kibana/pull/178766 (8.14)
As of https://github.com/elastic/elasticsearch/pull/103651 there is a new field caps option
include_empty_fields
. Discover is making use of this already: https://github.com/elastic/kibana/pull/174063We have various places where we use custom code to identify populated fields of an index by getting a random sample of docs and then check which fields are populated. These queries use
random_score
which can be a heavy query. We should migrate to the new field caps option which will be available as of8.13
.plugins/ml
x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts
Code that identifies populated fields for data grid.x-pack/plugins/ml/public/application/components/field_stats_flyout/populated_fields/get_merged_populated_fields_query.ts
plugins/aiops
x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_random_docs_request.ts
https://github.com/elastic/kibana/pull/178699 (8.14)plugins/transform
x-pack/plugins/transform/public/app/hooks/use_index_data.ts
Code that identifies populated fields for data grid.plugins/data_visualizer
x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts
Code that identifies if fields are empty or not. https://github.com/elastic/kibana/pull/178766 (8.14)x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/esql/use_esql_overall_stats_data.ts
https://github.com/elastic/kibana/pull/179098 (8.14)plugins/apm