Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KQL] Better programmatic API #77085

Closed
Tracked by #166068
lukasolson opened this issue Sep 9, 2020 · 4 comments
Closed
Tracked by #166068

[KQL] Better programmatic API #77085

lukasolson opened this issue Sep 9, 2020 · 4 comments
Labels
Feature:KQL KQL Feature:Search Querying infrastructure in Kibana Icebox impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@lukasolson
Copy link
Member

lukasolson commented Sep 9, 2020

KQL is being used in more and more places, such as the saved objects client, in fleet, in alerting, etc.

The KQL parser (built in PEG) doesn't perform well, so in cases where we want to improve performance, we've been interacting directly with the KQL AST nodes. Right now our APIs for doing so aren't very clean or documented.

We'd like to get to the point where we can do something simple like this:

const node = kql.and([
  kql.is(indexPattern, 'field', 'value')
  kql.not(kql.exists(indexPattern, field)
]);

And still get the performance increases we've seen from interacting directly with the AST nodes.

Related: #75693, #76589

@lukasolson lukasolson added loe:medium Medium Level of Effort Feature:KQL KQL Team:AppArch impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Sep 9, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lukeelmers
Copy link
Member

As an aside: this is conceptually similar to the Expression AST Builder (expressions also use PEG).

Although the nice thing here is that KQL functions aren't pluggable like expressions, which makes it possible to do a more explicit API as in the example above.

@exalate-issue-sync exalate-issue-sync bot added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels May 17, 2022
@petrklapka petrklapka added Feature:Search Querying infrastructure in Kibana Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. and removed Team:AppServicesSv labels Nov 23, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@kertal
Copy link
Member

kertal commented Oct 30, 2023

Closing this because it's not planned to be resolved in the foreseeable future. It will be tracked in our Icebox and will be re-opened if our priorities change. Feel free to re-open if you think it should be melted sooner.

@kertal kertal added the Icebox label Oct 30, 2023
@kertal kertal closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2023
@github-project-automation github-project-automation bot moved this to Done in current release in kibana-app-arch Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:KQL KQL Feature:Search Querying infrastructure in Kibana Icebox impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
Status: Done in current release
Development

No branches or pull requests

5 participants