# Routing in elastic search with range values

**URL:** <https://discuss.elastic.co/t/routing-in-elastic-search-with-range-values/12929>\
**Category:** Elasticsearch\
**Created:** [July 25, 2013, 6:14am UTC](https://discuss.elastic.co/t/routing-in-elastic-search-with-range-values/12929 "2013-07-25T06:14:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahesh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahesh1/32/2311_2.png) [@Mahesh1](https://discuss.elastic.co/u/Mahesh1)\
**Post date:** [July 25, 2013, 6:14am UTC](https://discuss.elastic.co/t/routing-in-elastic-search-with-range-values/12929/1 "2013-07-25T06:14:53Z")

</div>

Hi

I want to index 30 days of data, in each day i will get GB's of data  
I Have 30 days of data, i have 10 shards, i want to route in such away , that first 3 days of data should go to first shard, next 3 days of data should go to next shard ..etc

I am routing with date field, but i found data belongs to 1, 10,17 is going to 1 st 2, 11, .. going to next shard...etc .

Looking for u r response

---

<div class="post-metadata">

**Author:** ![Philip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/philip/32/2208_2.png) [@Philip](https://discuss.elastic.co/u/Philip)\
**Post date:** [July 25, 2013, 6:32am UTC](https://discuss.elastic.co/t/routing-in-elastic-search-with-range-values/12929/2 "2013-07-25T06:32:56Z")

</div>

I would love to know why. What is your application?

Philip

On Wed, Jul 24, 2013 at 11:14 PM, Mahesh [via Elasticsearch Users]  
[ml-node+s115913n4038621h5@n3.nabble.com](mailto:ml-node+s115913n4038621h5@n3.nabble.com) wrote:

> Hi
> 
> I want to index 30 days of data, in each day i will get GB's of data  
> I Have 30 days of data, i have 10 shards, i want to route in such away ,  
> that first 3 days of data should go to first shard, next 3 days of data  
> should go to next shard ..etc
> 
> I am routing with date field, but i found data belongs to 1, 10,17 is going  
> to 1 st 2, 11, .. going to next shard...etc .
> 
> Looking for u r response
> 
> * * *
> 
> If you reply to this email, your message will be added to the discussion  
> below:  
> [http://elasticsearch-users.115913.n3.nabble.com/Routing-in-elastic-search-with-range-values-tp4038621.html](http://elasticsearch-users.115913.n3.nabble.com/Routing-in-elastic-search-with-range-values-tp4038621.html)  
> To unsubscribe from Elasticsearch Users, click here.  
> NAML

---

<div class="post-metadata">

**Author:** ![Mahesh1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahesh1/32/2311_2.png) [@Mahesh1](https://discuss.elastic.co/u/Mahesh1)\
**Post date:** [July 26, 2013, 5:30am UTC](https://discuss.elastic.co/t/routing-in-elastic-search-with-range-values/12929/3 "2013-07-26T05:30:26Z")

</div>

Here is my project requirement

Continuously my application receives data (TB), I have to index every file, and from the GUI I should display the data (matching data)

After 90 days I will delete the 1st day data, and store 91 data in it, for this I am using 11 machines, 1 is master 10 are slaves, so that, I can store first 10 days data in one shard, 10-20 days of data in another shard and so on, when user asks to display data between the dates, I can fire the query on specific shard using routing. Indexing, and searching is easy with this approach, but I am unable to route first 10 days of data in to one shard.

And also I need faster queries, because in 90 days data may be extended to 300-400 TB

So I want to divide the data based on Date, so when a query is fired I ac search in 30 TB.

Looking for your response

---

<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, 2:24am UTC](https://discuss.elastic.co/t/routing-in-elastic-search-with-range-values/12929/4 "2017-07-06T02:24:27Z")

</div>


