# How to register Custom Query Parser Plugin in ES 6.2.4

**URL:** https://discuss.elastic.co/t/how-to-register-custom-query-parser-plugin-in-es-6-2-4/143361
**Category:** Elasticsearch
**Created:** [August 7, 2018, 3:25pm UTC](https://discuss.elastic.co/t/how-to-register-custom-query-parser-plugin-in-es-6-2-4/143361 "2018-08-07T15:25:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![amit.nema](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@amit.nema](https://discuss.elastic.co/u/amit.nema)
#### Post date: [August 7, 2018, 3:25pm UTC](https://discuss.elastic.co/t/how-to-register-custom-query-parser-plugin-in-es-6-2-4/143361/1 "2018-08-07T15:25:40Z")

</div>

Hello,

I am using Elasticsearch 6.2.4.

I am trying to create the Custom Query Parser Plugin.

I saw the mesage under [https://discuss.elastic.co/t/custom-query-parser-possible](https://discuss.elastic.co/t/custom-query-parser-possible) from May, 2011.

I have created my custom query parser as per the implementation of QueryStringQueryParser.

I need the help to register my custom plugin with the help of Plugin class.

As I can seet there is no method (registerQueryParser) availble now in indexModule.

> public void onIndexModule(IndexModule indexModule) {  
> &nbsp;&nbsp;&nbsp;&nbsp; indexModule._registerQueryParser_(...) /\* **method not available** \*/  
> }

Is there any other way to register my custom query parser?

Thanks in advance

---

<div class="post-metadata">

### Author: ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)
#### Post date: [August 7, 2018, 7:13pm UTC](https://discuss.elastic.co/t/how-to-register-custom-query-parser-plugin-in-es-6-2-4/143361/2 "2018-08-07T19:13:50Z")

</div>

You need your plugin to implement [SearchPlugin](https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/plugins/SearchPlugin.java) and override the `getQueries()` method to return your query implementations.

---

<div class="post-metadata">

### Author: ![amit.nema](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@amit.nema](https://discuss.elastic.co/u/amit.nema)
#### Post date: [August 31, 2018, 3:29pm UTC](https://discuss.elastic.co/t/how-to-register-custom-query-parser-plugin-in-es-6-2-4/143361/3 "2018-08-31T15:29:17Z")

</div>

Thanks a lot for your kind response. 😀

---

<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: [September 28, 2018, 3:29pm UTC](https://discuss.elastic.co/t/how-to-register-custom-query-parser-plugin-in-es-6-2-4/143361/4 "2018-09-28T15:29:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
