# Does order matter when doing range searches by date?

**URL:** <https://discuss.elastic.co/t/does-order-matter-when-doing-range-searches-by-date/18681>\
**Category:** Elasticsearch\
**Created:** [July 15, 2014, 3:35pm UTC](https://discuss.elastic.co/t/does-order-matter-when-doing-range-searches-by-date/18681 "2014-07-15T15:35:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [July 15, 2014, 3:35pm UTC](https://discuss.elastic.co/t/does-order-matter-when-doing-range-searches-by-date/18681/1 "2014-07-15T15:35:15Z")

</div>

Say I insert a few documents that have "date" field (not ES stamp) but the  
documents are not inserted in order of date.

{  
...  
"DateMoved": "2014-12-31..."  
}

{  
...  
"DateMoved": "2013-12-31..."  
}

{  
...  
"DateMoved": "2014-12-25..."  
}

{  
...  
"DateMoved": "2012-12-25..."  
}

{  
...  
"DateMoved": "2013-12-25..."  
}

And so on...

If i wanted to do a range query by DateMoved (For all documents in 2013-12)  
would it affect the speed of the query?

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c000ec08-abc9-44c1-9f88-544ce69a824c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c000ec08-abc9-44c1-9f88-544ce69a824c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:15am UTC](https://discuss.elastic.co/t/does-order-matter-when-doing-range-searches-by-date/18681/2 "2017-07-06T01:15:40Z")

</div>


