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

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?

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