# "No mapping found for...in order to sort on" for date field

**URL:** <https://discuss.elastic.co/t/no-mapping-found-for-in-order-to-sort-on-for-date-field/125641>\
**Category:** Elasticsearch\
**Created:** [March 26, 2018, 4:17pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-in-order-to-sort-on-for-date-field/125641 "2018-03-26T16:17:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Bourne](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kevin_bourne/32/53053_2.png) [@Kevin\_Bourne](https://discuss.elastic.co/u/Kevin_Bourne)\
**Post date:** [March 26, 2018, 4:17pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-in-order-to-sort-on-for-date-field/125641/1 "2018-03-26T16:17:14Z")

</div>

I am getting a "No mapping found for \<field\_name\> in order to sort on".

For this index I have an index template that has a dynamic template for strings to map to a text and a keyword with a lowercase normalizer. I don't specify specific mappings for each field because there may be hundreds of fields that I am retrieving from another system.

I have tried sorting on a keyword (ex. text\_field.keyword) and a date (ex my\_date) and both result in the no mapping found error.

I see there is an "unmapped\_type" that you can send in but I am not going to know what the type is ahead of time. Elasticsearch already "knows" the type because it is properly mapping types using the dynamic templates. What is going on and how do I fix this?

---

<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:** [April 23, 2018, 4:17pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-in-order-to-sort-on-for-date-field/125641/2 "2018-04-23T16:17:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
