# No mapping found for \[@timestamp\] in order to sort on

**URL:** <https://discuss.elastic.co/t/no-mapping-found-for-timestamp-in-order-to-sort-on/47570>\
**Category:** Elasticsearch\
**Created:** [April 16, 2016, 9:29pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-timestamp-in-order-to-sort-on/47570 "2016-04-16T21:29:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![byku](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@byku](https://discuss.elastic.co/u/byku)\
**Post date:** [April 16, 2016, 9:29pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-timestamp-in-order-to-sort-on/47570/1 "2016-04-16T21:29:01Z")

</div>

Hi,

I have next error on all search queries:  
[2016-04-16 21:14:45,049][INFO][rest.suppressed] /vastuf-vm-containers-_/\_search Params: {size=10000, ignore\_unavailable=true, \_source\_include=@timestamp,_, index=vastuf-vm-containers-\*}  
Failed to execute phase [query], all shards failed; shardFailures {[AcpTZc27Q9mC6msfZUsvsw][vastuf-vm-containers-2016-04-16][0]: RemoteTransportException[[hose][172.17.0.4:9300][indices:data/read/search[phase/query]]]; nested: SearchParseException[failed to parse search source [{"sort": [{"@timestamp": {"order": "asc"}}], "query": {"filtered": {"filter": {"bool": {"must": [{"range": {"@timestamp": {"gt": "2016-04-16T20:59:45.044337Z", "lte": "2016-04-16T21:14:45.044337Z"}}}]}}}}}]]; nested: SearchParseException[No mapping found for [@timestamp] in order to sort on]; }...

Here is mapping for this index:  
"vastuf-vm-containers-2016-04-16": {  
"mappings": {  
"containers": {  
"\_all": {  
"enabled": false  
},  
"dynamic\_templates": [  
{  
"notanalyzed": {  
"mapping": {  
"index": "not\_analyzed",  
"type": "string"  
},  
"match": "\*",  
"match\_mapping\_type": "string"  
}  
}  
],  
"properties": {  
"instance\_name": {  
"type": "string",  
"index": "not\_analyzed"  
},  
"name": {  
"type": "string",  
"index": "not\_analyzed"  
},  
"status": {  
"type": "string",  
"index": "not\_analyzed"  
},  
"timestamp": {  
"type": "date",  
"format": "strict\_date\_optional\_time||epoch\_millis"  
},  
"version": {  
"type": "string",  
"index": "not\_analyzed"  
}  
}  
}  
}  
}

I thought that dynamic\_templates could affect but there are declare timestamp property with type date.

So what could be the reason of this error?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 17, 2016, 9:14am UTC](https://discuss.elastic.co/t/no-mapping-found-for-timestamp-in-order-to-sort-on/47570/2 "2016-04-17T09:14:41Z")

</div>

Like it says, you have no `@timestamp`.  
Try using `timestamp` instead.

---

<div class="post-metadata">

**Author:** ![byku](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@byku](https://discuss.elastic.co/u/byku)\
**Post date:** [April 17, 2016, 12:14pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-timestamp-in-order-to-sort-on/47570/3 "2016-04-17T12:14:10Z")

</div>

Argh, stupid error. I thought that @ is a special symbol to specify fields. Thanks, it works now.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 17, 2016, 8:10pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-timestamp-in-order-to-sort-on/47570/4 "2016-04-17T20:10:19Z")

</div>

@ is used by Logstash as a metafield, it's not reserved as such.

---

<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 5, 2017, 10:58pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-timestamp-in-order-to-sort-on/47570/5 "2017-07-05T22:58:41Z")

</div>


