If runtime fields are being used in the datafeed config, the wizards should use the field type to correctly match the field to an agg.
Currently any runtime fields are matched to all detector functions.
Looks like keyword type runtime fields don't have this issue - these don't appear in the field dropdown for example when using lat_long, whereas numeric ones do.
If runtime fields are being used in the datafeed config, the wizards should use the field type to correctly match the field to an agg. Currently any runtime fields are matched to all detector functions.
Related functions: https://github.com/elastic/kibana/blob/5a727332c93d21a969961e5f13c7207b2b4b8ae7/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/advanced_detector_modal/advanced_detector_modal.tsx#L392
https://github.com/elastic/kibana/blob/5a727332c93d21a969961e5f13c7207b2b4b8ae7/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/util/general.ts#L89