# Timestamp

**URL:** <https://discuss.elastic.co/t/timestamp/15714>\
**Category:** Elasticsearch\
**Created:** [February 11, 2014, 3:34am UTC](https://discuss.elastic.co/t/timestamp/15714 "2014-02-11T03:34:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khoa\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@Khoa\_Nguyen](https://discuss.elastic.co/u/Khoa_Nguyen)\
**Post date:** [February 11, 2014, 3:34am UTC](https://discuss.elastic.co/t/timestamp/15714/1 "2014-02-11T03:34:36Z")

</div>

Here's my finding on the \_timestamp field.

curl -XPOST 'localhost:9200/bam' -d '{  
"mappings" : {  
"_default_" : {  
"\_timestamp": { "enabled" : true }  
}  
}  
}  
}'

curl -XPOST 'localhost:9200/bam/bam/' -d '{  
"bam" : "bam"  
}'

curl 'localhost:9200/bam/\_search?fields=\_source,\_timestamp&pretty'

{

"took" : 1,

"timed\_out" : false,

"\_shards" : {

```
"total" : 5,

"successful" : 5,

"failed" : 0

```

},

"hits" : {

```
"total" : 1,

"max_score" : 1.0,

"hits" : [ {

  "_index" : "bam",

  "_type" : "bam",

  "_id" : "DREzT5VFTe2aJQC5ZRQb2g",

  "_score" : 1.0, "_source" : {

"bam" : "bam"

```

}

```
} ]

```

}

}

curl -XPOST 'localhost:9200/bambam' -d '{  
"mappings" : {  
"_default_" : {  
"\_timestamp": { "enabled" : true, "store" : true }  
}  
}  
}  
}'

curl -XPOST 'localhost:9200/bambam/bambam/' -d '{  
"bambam" : "bambam"  
}'

curl 'localhost:9200/bambam/\_search?fields=\_source,\_timestamp&pretty'

{

"took" : 1,

"timed\_out" : false,

"\_shards" : {

```
"total" : 5,

"successful" : 5,

"failed" : 0

```

},

"hits" : {

```
"total" : 1,

"max_score" : 1.0,

"hits" : [ {

  "_index" : "bambam",

  "_type" : "bambam",

  "_id" : "bDa7LxPBRQaPnoxj6R96dw",

  "_score" : 1.0, "_source" : {

"bambam" : "bambam"

```

},

```
  "fields" : {

    "_timestamp" : 1392089217844

  }

} ]

```

}

}

Is this what you're seeing?

I guess timestamp is being "stored" somewhere in order for facet and query  
to work. But it is unexpected that without store: true, that no timestamps  
are returned in result.

--  
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/0b1dff20-aacd-405c-8db8-ba19295a8f89%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0b1dff20-aacd-405c-8db8-ba19295a8f89%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 11, 2014, 4:58am UTC](https://discuss.elastic.co/t/timestamp/15714/2 "2014-02-11T04:58:52Z")

</div>

Why it's unexpected?

If a field is not stored, you can not retrieve it. What's wrong with that?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 11 févr. 2014 à 04:34, Khoa Nguyen [huu.khoa.nguyen@gmail.com](mailto:huu.khoa.nguyen@gmail.com) a écrit :

Here's my finding on the \_timestamp field.

curl -XPOST 'localhost:9200/bam' -d '{  
"mappings" : {  
"_default_" : {  
"\_timestamp": { "enabled" : true }  
}  
}  
}  
}'

curl -XPOST 'localhost:9200/bam/bam/' -d '{  
"bam" : "bam"  
}'

curl 'localhost:9200/bam/\_search?fields=\_source,\_timestamp&pretty'  
{  
"took" : 1,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "bam",  
"\_type" : "bam",  
"\_id" : "DREzT5VFTe2aJQC5ZRQb2g",  
"\_score" : 1.0, "\_source" : {  
"bam" : "bam"  
}  
} ]  
}  
}

curl -XPOST 'localhost:9200/bambam' -d '{  
"mappings" : {  
"_default_" : {  
"\_timestamp": { "enabled" : true, "store" : true }  
}  
}  
}  
}'

curl -XPOST 'localhost:9200/bambam/bambam/' -d '{  
"bambam" : "bambam"  
}'

curl 'localhost:9200/bambam/\_search?fields=\_source,\_timestamp&pretty'  
{  
"took" : 1,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "bambam",  
"\_type" : "bambam",  
"\_id" : "bDa7LxPBRQaPnoxj6R96dw",  
"\_score" : 1.0, "\_source" : {  
"bambam" : "bambam"  
},  
"fields" : {  
"\_timestamp" : 1392089217844  
}  
} ]  
}  
}

Is this what you're seeing?

## I guess timestamp is being "stored" somewhere in order for facet and query to work. But it is unexpected that without store: true, that no timestamps are returned in result.

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/0b1dff20-aacd-405c-8db8-ba19295a8f89%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0b1dff20-aacd-405c-8db8-ba19295a8f89%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/A476DD88-A61F-40CC-9171-20143905DD9D%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/A476DD88-A61F-40CC-9171-20143905DD9D%40pilato.fr).  
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, 1:51am UTC](https://discuss.elastic.co/t/timestamp/15714/3 "2017-07-06T01:51:16Z")

</div>


