-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
At the moment there are a few ways to programmatically modify an app's search query:
- The QueryFilter service provides a filter centric API that directly modifies app state
- The filter_bar_click_handler and filter_bar directive work together to pick up filters created by user interaction with visualizations
- The filter_manager provides a higher level API that doesn't require client code to work directly with filter objects, but it only supports adding filters.
- Some code simply modifies app state directly without using any of these APIs.
Having all of these competing methods leads to a pretty confusing picture. The visualize refactor made it obvious that we need a simpler API that everyone can use to interact with queries/filters. Now that Kibana supports multiple query languages the need is even more acute. Clients need a way to interact with the query in basic ways without worrying about which language the user happens to have selected.
The new API will likely need to have methods that support legacy filter objects but the primary methods should be language agnostic. The API should not be coupled to UI components, as is the case with the filter_bar currently. The existing QueryManager is a start to this work that needs to be expanded further.