For some parts of the ML plugin's UI we construct ES queries on the client side and pass them to a generic esSearch endpoint. We should create dedicated API endpoints for these cases or migrate to use the data plugin. It will enable us to create API integration tests when fetching that data and should also reduce client side bundle size if we move the necessary logic to the server side.
For some parts of the ML plugin's UI we construct ES queries on the client side and pass them to a generic
esSearch
endpoint. We should create dedicated API endpoints for these cases or migrate to use thedata
plugin. It will enable us to create API integration tests when fetching that data and should also reduce client side bundle size if we move the necessary logic to the server side.plugins/ml
x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx
x-pack/plugins/ml/public/application/data_frame_analytics/common/analytics.ts
x-pack/plugins/ml/public/application/data_frame_analytics/common/get_index_data.ts
x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts
x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/searches.ts
x-pack/plugins/ml/public/application/services/results_service/result_service_rx.ts
x-pack/plugins/ml/public/application/services/results_service/results_service.js
x-pack/plugins/ml/server/models/results_service/anomaly_charts.ts
plugins/transform
https://github.com/elastic/kibana/pull/154898
x-pack/plugins/transform/public/app/hooks/use_api.ts
x-pack/plugins/transform/public/app/hooks/use_index_data.ts
x-pack/plugins/transform/public/app/hooks/__mocks__/use_api.ts
x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx
After all code has been ported to dedicated API endpoint, remove the
esSearch
endpoint from these files:x-pack/plugins/ml/public/application/services/ml_api_service/index.ts
/api/ml/es_search
route inx-pack/plugins/ml/server/routes/system.ts