elastic / kibana

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

[Security Solution][Detection Engine] Refactor `getFilter` into separate functions #185890

Open marshallmain opened 5 months ago

marshallmain commented 5 months ago

https://github.com/elastic/kibana/pull/184890#discussion_r1631488622

After #184890, we now have a function that can automatically fetch the necessary field mappings for fields in a query string. However, we don't always want to use this function, especially in loops, so it can be configured in 3 different ways: automatically load the fields, pass in a list of pre-fetched fields, or don't handle fields at all. We should refactor to split these use cases into different functions and make it more clear from the function name what the intent is instead of burying the detail in how the function parameters are set up.

elasticmachine commented 5 months ago

Pinging @elastic/security-detection-engine (Team:Detection Engine)