# Will ES introduce range based sharding in the future?

**URL:** <https://discuss.elastic.co/t/will-es-introduce-range-based-sharding-in-the-future/64665>\
**Category:** Elasticsearch\
**Created:** [November 2, 2016, 5:37am UTC](https://discuss.elastic.co/t/will-es-introduce-range-based-sharding-in-the-future/64665 "2016-11-02T05:37:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![makeyang](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@makeyang](https://discuss.elastic.co/u/makeyang)\
**Post date:** [November 2, 2016, 5:37am UTC](https://discuss.elastic.co/t/will-es-introduce-range-based-sharding-in-the-future/64665/1 "2016-11-02T05:37:37Z")

</div>

which is very useful for range scan and sorting

---

<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:** [November 2, 2016, 9:11am UTC](https://discuss.elastic.co/t/will-es-introduce-range-based-sharding-in-the-future/64665/2 "2016-11-02T09:11:30Z")

</div>

Please explain what you mean when you ask for things like this.

What exactly are you referring to by range sharding?

---

<div class="post-metadata">

**Author:** ![makeyang](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@makeyang](https://discuss.elastic.co/u/makeyang)\
**Post date:** [November 2, 2016, 9:37am UTC](https://discuss.elastic.co/t/will-es-introduce-range-based-sharding-in-the-future/64665/3 "2016-11-02T09:37:50Z")

</div>

quote from here: [https://docs.mongodb.com/manual/core/ranged-sharding/](https://docs.mongodb.com/manual/core/ranged-sharding/)

Ranged-based sharding involves dividing data into contiguous ranges determined  
by the shard key values. In this model, documents with “close” shard key  
values are likely to be in the same chunk or shard. This  
allows for efficient queries where reads target documents within a contiguous  
range

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 2, 2016, 9:49am UTC](https://discuss.elastic.co/t/will-es-introduce-range-based-sharding-in-the-future/64665/4 "2016-11-02T09:49:29Z")

</div>

In Elasticsearch you don't in my experience generally do any processing based on keys like you might do in some NoSQL data stores that has more limited indexing and query capabilities. If you wish to colocate data that is queried together in Elasticsearch and thereby be able to hit a minimum number of shards, you can use [routing](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/mapping-routing-field.html#_making_a_routing_value_required).

---

<div class="post-metadata">

**Author:** ![makeyang](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@makeyang](https://discuss.elastic.co/u/makeyang)\
**Post date:** [November 2, 2016, 10:09am UTC](https://discuss.elastic.co/t/will-es-introduce-range-based-sharding-in-the-future/64665/5 "2016-11-02T10:09:46Z")

</div>

got it. 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 5, 2017, 10:07pm UTC](https://discuss.elastic.co/t/will-es-introduce-range-based-sharding-in-the-future/64665/6 "2017-07-05T22:07:26Z")

</div>


