-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Description
Motivation
Kibana currently provides four different search mechanisms with overlapping responsibilities:
- Lucene query syntax in the query bar
- Query DSL in the query bar
- Filters created via the UI (which could include custom query DSL if edited)
- Console
Exposing the lucene query syntax and the query DSL to users creates a few problems. Since we don't control the query syntax we can't implement features that would require introspection into a user's query. This includes things like:
- Safe and seamless migrations of saved searches when ES search APIs change
- Typeahead/autocomplete in the query bar
- Dynamic help text
We could solve these problems by building a model in Kibana to represent raw Elasticsearch queries, but there are other advantages to building our own query language:
- We can support query types that are available in the ES query DSL that are not supported by the lucene query syntax
- We can implement functionality that is beyond the scope of the lucene query syntax, e.g. support for aggregations and visualizations in the query language
- We can provide finer grain controls for admins to restrict access to expensive queries, e.g. leading wildcards or regexes
- We can add support for scripted fields to the language
- We can unify the query bar and the filter bar, eliminating confusion about when to use one or the other
How
This is a meta ticket that we'll break down into smaller tasks. At a high level, here's what we're thinking:
- Create a feature toggle to support multiple query languages Implement new Kibana query language #12624
- Develop new kibana query language as experimental feature New Kibana Query Language #12282 Implement new Kibana query language #12624
- Build a better query editor Build an enhanced query editor #13621
- Consider adding support for filter features (pin/unpin, activate/deactivate) to the query language, possibly with something like VisualSearch.js. kuery doesn't allow pinning of filters or disabling filters #13564
- Add inline help
- Remove support for lucene query syntax and the filter bar, filtering via the UI will update the query (think Github filters) when new query experience is enabled
alepuccetti and nachiket-lab