# Request for recommendation to handle custom routing

**URL:** <https://discuss.elastic.co/t/request-for-recommendation-to-handle-custom-routing/40399>\
**Category:** Elasticsearch\
**Created:** [January 28, 2016, 5:53pm UTC](https://discuss.elastic.co/t/request-for-recommendation-to-handle-custom-routing/40399 "2016-01-28T17:53:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![logstash\_user](https://avatars.discourse-cdn.com/v4/letter/l/f19dbf/32.png) [@logstash\_user](https://discuss.elastic.co/u/logstash_user)\
**Post date:** [January 28, 2016, 5:53pm UTC](https://discuss.elastic.co/t/request-for-recommendation-to-handle-custom-routing/40399/1 "2016-01-28T17:53:17Z")

</div>

We have been using Elasticsearch for long and have come to a point where we need to do some custom routing. To place the problem in context, in one of the most important index, among many fields in a document, there are 2 fields lets call them eventkind and user. Now as it is many users are associated to a single eventkind and many eventkind to single user. Due to some requirements now we have opposing requirements and faces a issue on how to design the custom reading. If we using eventkind for routing, that will make the user spread out in many shards and hence a query that is based on user is slower and vice-versa. Would like to get some recommendation and thoughts on how one can address this.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 29, 2016, 2:02am UTC](https://discuss.elastic.co/t/request-for-recommendation-to-handle-custom-routing/40399/2 "2016-01-29T02:02:45Z")

</div>

Make a choice for either, or do both by having multiple indices with different views.

---

<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 5, 2017, 11:20pm UTC](https://discuss.elastic.co/t/request-for-recommendation-to-handle-custom-routing/40399/3 "2017-07-05T23:20:31Z")

</div>

Closed on July 5, 2017, 11:20pm UTC


