# Timestamp Based Sharding/Searching

**URL:** <https://discuss.elastic.co/t/timestamp-based-sharding-searching/11353>\
**Category:** Elasticsearch\
**Created:** [March 28, 2013, 12:18pm UTC](https://discuss.elastic.co/t/timestamp-based-sharding-searching/11353 "2013-03-28T12:18:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarang\_dawer](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tarang\_dawer](https://discuss.elastic.co/u/tarang_dawer)\
**Post date:** [March 28, 2013, 12:18pm UTC](https://discuss.elastic.co/t/timestamp-based-sharding-searching/11353/1 "2013-03-28T12:18:06Z")

</div>

Hi

i want to use elasticsearch for realtime analysis , for which partitioning  
scheme is , dumping the indexes in a round robin fashion with a period of  
4/2 hrs ( 6/12 shards in total (cycle of 24 hrs)) . Each record contains a  
time stamp (long) value .

For the querying part , the routing parameter is required for optimizing  
search . in the query there's a time stamp range interval ( t1 , t2 ) ,  
for the interval range ,the result is desired.

how should i use this interval to translate into shard routing key ? could  
somebody please suggest some idea how to achieve this ?

Thanks  
Tarang Dawer

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:43am UTC](https://discuss.elastic.co/t/timestamp-based-sharding-searching/11353/2 "2017-07-06T02:43:53Z")

</div>


