# Custom Query Parser possible?

**URL:** https://discuss.elastic.co/t/custom-query-parser-possible/4400
**Category:** Elasticsearch
**Created:** [May 13, 2011, 6:52pm UTC](https://discuss.elastic.co/t/custom-query-parser-possible/4400 "2011-05-13T18:52:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)
#### Post date: [May 13, 2011, 6:52pm UTC](https://discuss.elastic.co/t/custom-query-parser-possible/4400/1 "2011-05-13T18:52:11Z")

</div>

Hello,

I see in this message from December 2010 there is/was no support for  
custom Query Parsers:  
[http://groups.google.com/a/elasticsearch.com/group/users/browse\_thread/thread/730dae611b91b0ae/aab4e35f9b8063f2?lnk=gst&q=custom+query+parser#aab4e35f9b8063f2](http://groups.google.com/a/elasticsearch.com/group/users/browse_thread/thread/730dae611b91b0ae/aab4e35f9b8063f2?lnk=gst&q=custom+query+parser#aab4e35f9b8063f2)

Is that still the case? I can't find any mention of custom query  
parsers in the docs, so I'm assuming one is still limited to using the  
Lucene QP?

## Thanks, Otis

Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch  
Lucene ecosystem search :: [http://search-lucene.com/](http://search-lucene.com/)

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [May 13, 2011, 6:57pm UTC](https://discuss.elastic.co/t/custom-query-parser-possible/4400/2 "2011-05-13T18:57:11Z")

</div>

You can implement your own custom query in elasticsearch (for example: my\_special\_query\_string type). It should know how to parse itself and generate a Lucene Query out of it. Check the QueryStringQueryParser. You will then need to register it under your name (my\_speial\_query\_parser) using a plugin.  
On Friday, May 13, 2011 at 9:52 PM, Otis wrote:

> Hello,
> 
> I see in this message from December 2010 there is/was no support for  
> custom Query Parsers:  
> [http://groups.google.com/a/elasticsearch.com/group/users/browse\_thread/thread/730dae611b91b0ae/aab4e35f9b8063f2?lnk=gst&q=custom+query+parser#aab4e35f9b8063f2](http://groups.google.com/a/elasticsearch.com/group/users/browse_thread/thread/730dae611b91b0ae/aab4e35f9b8063f2?lnk=gst&q=custom+query+parser#aab4e35f9b8063f2)
> 
> Is that still the case? I can't find any mention of custom query  
> parsers in the docs, so I'm assuming one is still limited to using the  
> Lucene QP?
> 
> ## Thanks, Otis
> 
> Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch  
> Lucene ecosystem search :: [http://search-lucene.com/](http://search-lucene.com/)

---

<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, 4:06am UTC](https://discuss.elastic.co/t/custom-query-parser-possible/4400/3 "2017-07-06T04:06:16Z")

</div>


