# Problems with timestamp field feature

**URL:** <https://discuss.elastic.co/t/problems-with-timestamp-field-feature/8502>\
**Category:** Elasticsearch\
**Created:** [July 24, 2012, 2:36pm UTC](https://discuss.elastic.co/t/problems-with-timestamp-field-feature/8502 "2012-07-24T14:36:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [July 24, 2012, 2:36pm UTC](https://discuss.elastic.co/t/problems-with-timestamp-field-feature/8502/1 "2012-07-24T14:36:59Z")

</div>

Hi,

```
Is the _timestamp field supposed to show up in documents if enabled

```

(with store=true)?

```
If so, I can't get it to work. I've setup default-mapping.json to:

```

{ "_default_" : {  
"\_timestamp": {  
"enabled": true,  
"store": true,  
"index": "analyzed"  
}  
}}

```
When indexing (through java)

```

"setTimestamp(String.valueOf(System.currentTimeMillis()))" is called. But  
when doing a simple search (\_search/q=_:_) the "\_timestamp" field won't  
show up. Any clue anyone?

Cheers,  
Thiago Souza

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 24, 2012, 3:39pm UTC](https://discuss.elastic.co/t/problems-with-timestamp-field-feature/8502/2 "2012-07-24T15:39:36Z")

</div>

Hi Thiago

> ```
> Is the _timestamp field supposed to show up in documents if
> 
> ```
> 
> enabled (with store=true)?

you have to explicitly request it with fields=['\_timestamp','\_source']

clint

> ```
> If so, I can't get it to work. I've setup default-mapping.json to:
> 
> ```
> 
> { "_default_" : {  
> "\_timestamp": {  
> "enabled": true,  
> "store": true,  
> "index": "analyzed"  
> }  
> }}
> 
> ```
> When indexing (through java)
> 
> ```
> 
> "setTimestamp(String.valueOf(System.currentTimeMillis()))" is called.  
> But when doing a simple search (\_search/q=_:_) the "\_timestamp" field  
> won't show up. Any clue anyone?
> 
> Cheers,  
> Thiago Souza

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [July 24, 2012, 4:22pm UTC](https://discuss.elastic.co/t/problems-with-timestamp-field-feature/8502/3 "2012-07-24T16:22:29Z")

</div>

Hi,

```
 Got it! Thanks!!!

```

Cheers

On Tue, Jul 24, 2012 at 12:39 PM, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)wrote:

> Hi Thiago
> 
> > ```
> > Is the _timestamp field supposed to show up in documents if
> > 
> > ```
> > 
> > enabled (with store=true)?
> 
> you have to explicitly request it with fields=['\_timestamp','\_source']
> 
> clint
> 
> > ```
> > If so, I can't get it to work. I've setup default-mapping.json to:
> > 
> > ```
> > 
> > { "_default_" : {  
> > "\_timestamp": {  
> > "enabled": true,  
> > "store": true,  
> > "index": "analyzed"  
> > }  
> > }}
> > 
> > ```
> > When indexing (through java)
> > 
> > ```
> > 
> > "setTimestamp(String.valueOf(System.currentTimeMillis()))" is called.  
> > But when doing a simple search (\_search/q=_:_) the "\_timestamp" field  
> > won't show up. Any clue anyone?
> > 
> > Cheers,  
> > Thiago Souza

---

<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, 3:19am UTC](https://discuss.elastic.co/t/problems-with-timestamp-field-feature/8502/4 "2017-07-06T03:19:15Z")

</div>


