# IndexQueryParserModule Custom Filter with Shard awareness

**URL:** <https://discuss.elastic.co/t/indexqueryparsermodule-custom-filter-with-shard-awareness/19730>\
**Category:** Elasticsearch\
**Created:** [September 11, 2014, 6:46am UTC](https://discuss.elastic.co/t/indexqueryparsermodule-custom-filter-with-shard-awareness/19730 "2014-09-11T06:46:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [September 11, 2014, 6:46am UTC](https://discuss.elastic.co/t/indexqueryparsermodule-custom-filter-with-shard-awareness/19730/1 "2014-09-11T06:46:31Z")

</div>

Hi,

If I need to create my own query or filter parser, I can use a plugin that  
adds a new processor using the IndexQueryParserModule. It contains a  
QueryParserContext argument which holds the Index name. Is there any way I  
can be aware of the shardId to which I am being routed at that time inside  
the FilterParser class? Since the parser is invoked once for every shard,  
it will be good if that information could have been passed on in the  
argument to the filter/query parser.

Thanks,  
Sandeep

--  
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/c1cde10e-3cf9-4c5c-9177-4f972c663208%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c1cde10e-3cf9-4c5c-9177-4f972c663208%40googlegroups.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:03am UTC](https://discuss.elastic.co/t/indexqueryparsermodule-custom-filter-with-shard-awareness/19730/2 "2017-07-06T01:03:10Z")

</div>


