# Shard allocation by term

**URL:** <https://discuss.elastic.co/t/shard-allocation-by-term/32244>\
**Category:** Elasticsearch\
**Created:** [October 15, 2015, 8:03am UTC](https://discuss.elastic.co/t/shard-allocation-by-term/32244 "2015-10-15T08:03:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guy\_Kobrinsky](https://avatars.discourse-cdn.com/v4/letter/g/91b2a8/32.png) [@Guy\_Kobrinsky](https://discuss.elastic.co/u/Guy_Kobrinsky)\
**Post date:** [October 15, 2015, 8:03am UTC](https://discuss.elastic.co/t/shard-allocation-by-term/32244/1 "2015-10-15T08:03:00Z")

</div>

I have a cluster where I only query for "give me all values by term"  
if I want to ensure each request will route only to one shard I have to somehow replace the shard allocation policy from 'shard by id' to 'shard by hash on the term'  
is this possible ? how to I do that ?

---

<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:** [October 15, 2015, 8:34pm UTC](https://discuss.elastic.co/t/shard-allocation-by-term/32244/2 "2015-10-15T20:34:23Z")

</div>

Have you seen [https://www.elastic.co/guide/en/elasticsearch/guide/current/routing-value.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/routing-value.html)?

---

<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:44pm UTC](https://discuss.elastic.co/t/shard-allocation-by-term/32244/3 "2017-07-05T23:44:32Z")

</div>

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


