# ComplexPhraseQueryParser; part of Lucene, but not ElasticSearch?

**URL:** <https://discuss.elastic.co/t/complexphrasequeryparser-part-of-lucene-but-not-elasticsearch/9050>\
**Category:** Elasticsearch\
**Created:** [September 18, 2012, 2:37pm UTC](https://discuss.elastic.co/t/complexphrasequeryparser-part-of-lucene-but-not-elasticsearch/9050 "2012-09-18T14:37:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LittleGrimmy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/littlegrimmy/32/2714_2.png) [@LittleGrimmy](https://discuss.elastic.co/u/LittleGrimmy)\
**Post date:** [September 18, 2012, 2:37pm UTC](https://discuss.elastic.co/t/complexphrasequeryparser-part-of-lucene-but-not-elasticsearch/9050/1 "2012-09-18T14:37:43Z")

</div>

Hi!

I'm a bit confused, and slightly desperate. I need the functionality of  
the ComplexPhraseQueryParser. It's a part of Lucene 3.6.1, so why isn't it  
available in ElasticSearch?

Thanks in advance!

--

---

<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:** [September 18, 2012, 7:50pm UTC](https://discuss.elastic.co/t/complexphrasequeryparser-part-of-lucene-but-not-elasticsearch/9050/2 "2012-09-18T19:50:25Z")

</div>

Its simply not exposed as part of the query DSL, though it potentially can be. You could write your own plugin that introduces a new query type into the DSL that does that if you urgently need it.

On Sep 18, 2012, at 4:37 PM, LittleGrimmy [toreau@gmail.com](mailto:toreau@gmail.com) wrote:

> Hi!
> 
> I'm a bit confused, and slightly desperate. I need the functionality of the ComplexPhraseQueryParser. It's a part of Lucene 3.6.1, so why isn't it available in Elasticsearch?
> 
> Thanks in advance!
> 
> --

--

---

<div class="post-metadata">

**Author:** ![LittleGrimmy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/littlegrimmy/32/2714_2.png) [@LittleGrimmy](https://discuss.elastic.co/u/LittleGrimmy)\
**Post date:** [September 19, 2012, 6:58am UTC](https://discuss.elastic.co/t/complexphrasequeryparser-part-of-lucene-but-not-elasticsearch/9050/3 "2012-09-19T06:58:28Z")

</div>

Are there any plans to expose it in the near future? 🙂 If not, what's the  
best way to get introduced to writing ES plugins?

Thanks!

On Tuesday, September 18, 2012 9:50:31 PM UTC+2, kimchy wrote:

> Its simply not exposed as part of the query DSL, though it potentially can  
> be. You could write your own plugin that introduces a new query type into  
> the DSL that does that if you urgently need it.
> 
> On Sep 18, 2012, at 4:37 PM, LittleGrimmy \<[tor...@gmail.com](mailto:tor...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Hi!
> > 
> > I'm a bit confused, and slightly desperate. I need the functionality of  
> > the ComplexPhraseQueryParser. It's a part of Lucene 3.6.1, so why isn't it  
> > available in Elasticsearch?
> > 
> > Thanks in advance!
> > 
> > --

--

---

<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:** [September 28, 2012, 11:22am UTC](https://discuss.elastic.co/t/complexphrasequeryparser-part-of-lucene-but-not-elasticsearch/9050/4 "2012-09-28T11:22:13Z")

</div>

No, there aren't plans to do that, but open an issue, so we can track it. The best way is to simply write a plugin that implements it.

On Sep 19, 2012, at 8:58 AM, LittleGrimmy [toreau@gmail.com](mailto:toreau@gmail.com) wrote:

> Are there any plans to expose it in the near future? 🙂 If not, what's the best way to get introduced to writing ES plugins?
> 
> Thanks!
> 
> On Tuesday, September 18, 2012 9:50:31 PM UTC+2, kimchy wrote:  
> Its simply not exposed as part of the query DSL, though it potentially can be. You could write your own plugin that introduces a new query type into the DSL that does that if you urgently need it.
> 
> On Sep 18, 2012, at 4:37 PM, LittleGrimmy [tor...@gmail.com](mailto:tor...@gmail.com) wrote:
> 
> > Hi!
> > 
> > I'm a bit confused, and slightly desperate. I need the functionality of the ComplexPhraseQueryParser. It's a part of Lucene 3.6.1, so why isn't it available in Elasticsearch?
> > 
> > Thanks in advance!
> > 
> > --
> 
> --

--

---

<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, 3:10am UTC](https://discuss.elastic.co/t/complexphrasequeryparser-part-of-lucene-but-not-elasticsearch/9050/5 "2017-07-06T03:10:58Z")

</div>


