# Ordering record inserts via global counter, datetime stamp?

**URL:** <https://discuss.elastic.co/t/ordering-record-inserts-via-global-counter-datetime-stamp/3690>\
**Category:** Elasticsearch\
**Created:** [December 22, 2010, 7:14pm UTC](https://discuss.elastic.co/t/ordering-record-inserts-via-global-counter-datetime-stamp/3690 "2010-12-22T19:14:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![byuva](https://avatars.discourse-cdn.com/v4/letter/b/b5ac83/32.png) [@byuva](https://discuss.elastic.co/u/byuva)\
**Post date:** [December 22, 2010, 7:14pm UTC](https://discuss.elastic.co/t/ordering-record-inserts-via-global-counter-datetime-stamp/3690/1 "2010-12-22T19:14:14Z")

</div>

I would like to do some asynchronous, incremental processing of documents once they are inserted into the index. I would like to be able to query ES and essentially ask "give me all the documents added since this 'point in time' or since this 'global counter' to which I've already processed"). Is the only way to do this by supplying client side timestamps to each indexed record and making sure to keep all the client clocks in sync?

-b

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 23, 2010, 4:31am UTC](https://discuss.elastic.co/t/ordering-record-inserts-via-global-counter-datetime-stamp/3690/2 "2010-12-23T04:31:30Z")

</div>

Yes, you need to provide timestamps and then use them when you query.

On Wed, Dec 22, 2010 at 9:14 PM, byuva [brian@merrells.org](mailto:brian@merrells.org) wrote:

> I would like to do some asynchronous, incremental processing of documents  
> once they are inserted into the index. I would like to be able to query  
> ES  
> and essentially ask "give me all the documents added since this 'point in  
> time' or since this 'global counter' to which I've already processed"). Is  
> the only way to do this by supplying client side timestamps to each indexed  
> record and making sure to keep all the client clocks in sync?
> 
> ## -b
> 
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Ordering-record-inserts-via-global-counter-datetime-stamp-tp2133000p2133000.html](http://elasticsearch-users.115913.n3.nabble.com/Ordering-record-inserts-via-global-counter-datetime-stamp-tp2133000p2133000.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<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, 4:14am UTC](https://discuss.elastic.co/t/ordering-record-inserts-via-global-counter-datetime-stamp/3690/3 "2017-07-06T04:14:54Z")

</div>

Closed on July 6, 2017, 4:14am UTC


