# Custom routing based on date range

**URL:** <https://discuss.elastic.co/t/custom-routing-based-on-date-range/67446>\
**Category:** Elasticsearch\
**Created:** [November 29, 2016, 8:24am UTC](https://discuss.elastic.co/t/custom-routing-based-on-date-range/67446 "2016-11-29T08:24:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![subbu.nv](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@subbu.nv](https://discuss.elastic.co/u/subbu.nv)\
**Post date:** [November 29, 2016, 8:24am UTC](https://discuss.elastic.co/t/custom-routing-based-on-date-range/67446/1 "2016-11-29T08:24:37Z")

</div>

Hi ,

i am currently having index names like abc\_2014, abc\_2015, abc\_2016.. etc. (index names are dynamically created at the logstash level)

is there a way i can apply custom routing on index names, so that if i have to search aginst the index, abc\_2016, instead of searching all the shrads, it is going to search one shrad only? i am trying to use this feature to improve my search performance.

Please suggest.

thanks  
Subbu

---

<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:** [December 27, 2016, 8:24am UTC](https://discuss.elastic.co/t/custom-routing-based-on-date-range/67446/2 "2016-12-27T08:24:45Z")

</div>

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