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

Add to Kuery syntax the possibility for single and multiline comments #162343

Closed
Tracked by #166068
111andre111 opened this issue Jul 20, 2023 · 2 comments
Closed
Tracked by #166068
Labels
enhancement New value added to drive a business result Feature:KQL KQL Icebox impact:low Addressing this issue will have a low 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

@111andre111
Copy link

Describe the feature:
As of today kuery syntax doesn't offer to add comments to more complex queries.
Given that more and more complex queries need to bed used especially in the context of alerts and some other place where kuery is used.
https://www.elastic.co/guide/en/kibana/8.8/kuery-query.html
https://github.com/elastic/kibana/blob/e98abd0fb5896b573de7ab811534d134d15d7cb9/packages/kbn-es-query/src/kuery/grammar/grammar.peggy

Additional comment:
It seems that's as of today not possible. Given on the situation probably sometimes a single line and sometimes a multiline comments might make sense.
Given that kuery is based on peg.js fork peggy I think I found here some examples that do exactly what I think about:
https://github.com/peggyjs/peggy/blob/e6c380d8de33daedb583427c727313dd0b7f09ea/src/parser.pegjs#L310-L314

@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 20, 2023
@111andre111 111andre111 added the Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. label Jul 20, 2023
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 20, 2023
@lukasolson lukasolson added Feature:KQL KQL loe:medium Medium Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Jul 20, 2023
@sophiec20 sophiec20 added enhancement New value added to drive a business result and removed >enhancement labels Mar 27, 2024
@kertal kertal added the Icebox label Oct 1, 2024
@kertal
Copy link
Member

kertal commented Oct 1, 2024

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.

Comments are supported in ES|QL btw:
https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-syntax.html#esql-comments

@kertal kertal closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:KQL KQL Icebox impact:low Addressing this issue will have a low 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
None yet
Development

No branches or pull requests

5 participants