# Timestamps

**URL:** https://discuss.elastic.co/t/timestamps/4305
**Category:** Elasticsearch
**Created:** [April 27, 2011, 3:45pm UTC](https://discuss.elastic.co/t/timestamps/4305 "2011-04-27T15:45:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![plaflamme](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@plaflamme](https://discuss.elastic.co/u/plaflamme)
#### Post date: [April 27, 2011, 3:45pm UTC](https://discuss.elastic.co/t/timestamps/4305/1 "2011-04-27T15:45:29Z")

</div>

Hi,

Are there any timestamps (at the index level) that can be used to  
synchronize an index with its external "source"? For example, creation and  
last update timestamps. I could manage them myself (using "\_meta"), but I'm  
wondering if es already provides something I could use.

Thanks,  
Philippe

---

<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: [April 27, 2011, 5:15pm UTC](https://discuss.elastic.co/t/timestamps/4305/2 "2011-04-27T17:15:41Z")

</div>

Do you mean per document or per whole index? Not sure I understand...  
On Wednesday, April 27, 2011 at 6:45 PM, Philippe Laflamme wrote:

> Hi,
> 
> Are there any timestamps (at the index level) that can be used to synchronize an index with its external "source"? For example, creation and last update timestamps. I could manage them myself (using "\_meta"), but I'm wondering if es already provides something I could use.
> 
> Thanks,  
> Philippe

---

<div class="post-metadata">

### Author: ![plaflamme](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@plaflamme](https://discuss.elastic.co/u/plaflamme)
#### Post date: [April 27, 2011, 5:34pm UTC](https://discuss.elastic.co/t/timestamps/4305/3 "2011-04-27T17:34:41Z")

</div>

Hi,

Ideally, I'd have timestamps for both, but at least the ones for the whole  
index. Having a "last update" on the index that would tell me when the last  
write operation occurred (whatever it was).

I'd also have these at the document level, but I had planned to manage these  
myself.

I'm indexing something that may change over time and I have timestamps on  
that (created, last updated). I'd like to synchronize the source and its  
index. I can store the source's timestamps in a "\_meta" field of the mapping  
and a document's timestamps in one of its fields. This way, I would know if  
the index is up to date and, if not, which documents need to be updated.

Does that help understand what I'm trying to achieve?  
Philippe

On Wed, Apr 27, 2011 at 13:15, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> Do you mean per document or per whole index? Not sure I understand...
> 
> On Wednesday, April 27, 2011 at 6:45 PM, Philippe Laflamme wrote:
> 
> Hi,
> 
> Are there any timestamps (at the index level) that can be used to  
> synchronize an index with its external "source"? For example, creation and  
> last update timestamps. I could manage them myself (using "\_meta"), but I'm  
> wondering if es already provides something I could use.
> 
> Thanks,  
> Philippe

---

<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: [April 27, 2011, 6:03pm UTC](https://discuss.elastic.co/t/timestamps/4305/4 "2011-04-27T18:03:27Z")

</div>

Yes, and you can try and store latest timestamp in the \_meta, sure. Another option is to use the statistical facet on the relevant timestamp field in the doc.  
On Wednesday, April 27, 2011 at 8:34 PM, Philippe Laflamme wrote:

> Hi,
> 
> Ideally, I'd have timestamps for both, but at least the ones for the whole index. Having a "last update" on the index that would tell me when the last write operation occurred (whatever it was).
> 
> I'd also have these at the document level, but I had planned to manage these myself.
> 
> I'm indexing something that may change over time and I have timestamps on that (created, last updated). I'd like to synchronize the source and its index. I can store the source's timestamps in a "\_meta" field of the mapping and a document's timestamps in one of its fields. This way, I would know if the index is up to date and, if not, which documents need to be updated.
> 
> Does that help understand what I'm trying to achieve?  
> Philippe
> 
> On Wed, Apr 27, 2011 at 13:15, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:
> 
> > Do you mean per document or per whole index? Not sure I understand...  
> > On Wednesday, April 27, 2011 at 6:45 PM, Philippe Laflamme wrote:
> > 
> > > Hi,
> > > 
> > > Are there any timestamps (at the index level) that can be used to synchronize an index with its external "source"? For example, creation and last update timestamps. I could manage them myself (using "\_meta"), but I'm wondering if es already provides something I could use.
> > > 
> > > Thanks,  
> > > Philippe

---

<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:07am UTC](https://discuss.elastic.co/t/timestamps/4305/5 "2017-07-06T04:07:30Z")

</div>


