When DataViewLazy is implemented (#167750), ML based alerting rules should be evaluated to consume this new class. The benefit of it is that it's no longer triggering a request for fields (field_caps request to ES) when being initialized. When fields are not needed, this saves a lot of redundant requests to Elasticsearch. At the first sight it seems the DataView service is needed to get the fieldFormatMap. For this the requests for fields should not be necessary:
When DataViewLazy is implemented (#167750), ML based alerting rules should be evaluated to consume this new class. The benefit of it is that it's no longer triggering a request for fields (field_caps request to ES) when being initialized. When fields are not needed, this saves a lot of redundant requests to Elasticsearch. At the first sight it seems the DataView service is needed to get the
fieldFormatMap
. For this the requests for fields should not be necessary:https://github.com/elastic/kibana/blob/50dabea70ff3df5de077626a7cbc139bbb51600d/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts#L217-L234