elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.63k stars 8.23k forks source link

[ML] Anomaly detection wizards should limit detector functions for runtime fields based on type #134678

Open jgowdyelastic opened 2 years ago

jgowdyelastic commented 2 years ago

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

elasticmachine commented 2 years ago

Pinging @elastic/ml-ui (:ml)

peteharverson commented 2 years ago

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.

image