opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.76k stars 1.82k forks source link

ANTLR grammar for the OpenSearch query language #12174

Open svanschalkwyk opened 9 months ago

svanschalkwyk commented 9 months ago

Is your feature request related to a problem? Please describe

I'd like to use a grammar to validate queries.

Describe the solution you'd like

Access to the DSL grammar. I can only find SQL and Painless grammars.

Related component

Search

Describe alternatives you've considered

No response

Additional context

No response

dblock commented 9 months ago

AFAIK no, where did you find the other grammars (links?)? Is this something that belongs in https://github.com/opensearch-project/opensearch-api-specification?

svanschalkwyk commented 9 months ago

@dblock just search for *.g4 files.

dblock commented 9 months ago

Oh I see, https://github.com/opensearch-project/OpenSearch/tree/main/modules/lang-painless/src/main/antlr.

peternied commented 9 months ago

[Triage - attendees 1 2 3] @svanschalkwyk Thanks for filing, we'd welcome a pull request to add this feature.