# Formal Grammar of Query DSL?

**URL:** https://discuss.elastic.co/t/formal-grammar-of-query-dsl/17133
**Category:** Elasticsearch
**Created:** [April 22, 2014, 8:26pm UTC](https://discuss.elastic.co/t/formal-grammar-of-query-dsl/17133 "2014-04-22T20:26:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)
#### Post date: [April 22, 2014, 8:26pm UTC](https://discuss.elastic.co/t/formal-grammar-of-query-dsl/17133/1 "2014-04-22T20:26:23Z")

</div>

Hi,

is there available any formal grammar of Query DSL for Elasticsearch? (may  
be a PEG one [1] could be a good fit?)

Regards,  
Lukas

[1] [http://en.wikipedia.org/wiki/Parsing\_expression\_grammar](http://en.wikipedia.org/wiki/Parsing_expression_grammar)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAO9cvUabCUw%3DkwQrKvVTS1cQ4aE0DTcqN2OuQomRJqNyrmtkvA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO9cvUabCUw%3DkwQrKvVTS1cQ4aE0DTcqN2OuQomRJqNyrmtkvA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![nicktackes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicktackes/32/1174_2.png) [@nicktackes](https://discuss.elastic.co/u/nicktackes)
#### Post date: [April 22, 2014, 8:40pm UTC](https://discuss.elastic.co/t/formal-grammar-of-query-dsl/17133/2 "2014-04-22T20:40:15Z")

</div>

Not a direct match,  
but i did locate this grammar to lucene.

[https://github.com/thoward/lucene-query-parser.js/blob/master/lucene-query.grammar](https://github.com/thoward/lucene-query-parser.js/blob/master/lucene-query.grammar)

On Tuesday, April 22, 2014 1:26:23 PM UTC-7, Lukáš Vlček wrote:

> Hi,
> 
> is there available any formal grammar of Query DSL for Elasticsearch? (may  
> be a PEG one [1] could be a good fit?)
> 
> Regards,  
> Lukas
> 
> [1] [Parsing expression grammar - Wikipedia](http://en.wikipedia.org/wiki/Parsing_expression_grammar)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/eae27cb6-5bc1-44cf-91a4-43e1edc4132c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eae27cb6-5bc1-44cf-91a4-43e1edc4132c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)
#### Post date: [April 22, 2014, 8:50pm UTC](https://discuss.elastic.co/t/formal-grammar-of-query-dsl/17133/3 "2014-04-22T20:50:28Z")

</div>

Not direct match but very interesting indeed! 🙂

On Tue, Apr 22, 2014 at 10:40 PM, Nick Tackes [ntackes@gmail.com](mailto:ntackes@gmail.com) wrote:

> Not a direct match,  
> but i did locate this grammar to lucene.
> 
> [https://github.com/thoward/lucene-query-parser.js/blob/master/lucene-query.grammar](https://github.com/thoward/lucene-query-parser.js/blob/master/lucene-query.grammar)
> 
> On Tuesday, April 22, 2014 1:26:23 PM UTC-7, Lukáš Vlček wrote:
> 
> > Hi,
> > 
> > is there available any formal grammar of Query DSL for Elasticsearch?  
> > (may be a PEG one [1] could be a good fit?)
> > 
> > Regards,  
> > Lukas
> > 
> > [1] [Parsing expression grammar - Wikipedia](http://en.wikipedia.org/wiki/Parsing_expression_grammar)
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/eae27cb6-5bc1-44cf-91a4-43e1edc4132c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eae27cb6-5bc1-44cf-91a4-43e1edc4132c%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/eae27cb6-5bc1-44cf-91a4-43e1edc4132c%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/eae27cb6-5bc1-44cf-91a4-43e1edc4132c%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAO9cvUZKODYkJ\_-fUiJzEaWB4cDo\_FH1ndCJf9Q7CvDiUiSyBQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO9cvUZKODYkJ_-fUiJzEaWB4cDo_FH1ndCJf9Q7CvDiUiSyBQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 1:34am UTC](https://discuss.elastic.co/t/formal-grammar-of-query-dsl/17133/4 "2017-07-06T01:34:13Z")

</div>


