Add to Kuery syntax the possibility for single and multiline comments #162343
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.
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
The text was updated successfully, but these errors were encountered: