# How to change the default way of data distribution into shards?

**URL:** <https://discuss.elastic.co/t/how-to-change-the-default-way-of-data-distribution-into-shards/8509>\
**Category:** Elasticsearch\
**Created:** [July 24, 2012, 10:11pm UTC](https://discuss.elastic.co/t/how-to-change-the-default-way-of-data-distribution-into-shards/8509 "2012-07-24T22:11:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajasuja18](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@ajasuja18](https://discuss.elastic.co/u/ajasuja18)\
**Post date:** [July 24, 2012, 10:11pm UTC](https://discuss.elastic.co/t/how-to-change-the-default-way-of-data-distribution-into-shards/8509/1 "2012-07-24T22:11:14Z")

</div>

Hey

How can we change the default way of data allocation to shards(which is  
hashing of some unique id) to some range basis  
like all the ids ranging from 1-100 will go to shard1, 101-200 to shard2  
and so on?  
(I think using Routing we can do that but any help would be greatly  
appreciated)

Also if we are able to do the sharding on some range basis, then if new  
products come in future with higher range of ids then  
can we increase the number of shards dynamically without bringing down the  
whole cluster?

Any feedback on the above questions..!!!

Thanks

---

<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, 3:19am UTC](https://discuss.elastic.co/t/how-to-change-the-default-way-of-data-distribution-into-shards/8509/2 "2017-07-06T03:19:11Z")

</div>


