diff --git a/pygeoapi/provider/elasticsearch_.py b/pygeoapi/provider/elasticsearch_.py index 9072189..47e2b69 100644 --- a/pygeoapi/provider/elasticsearch_.py +++ b/pygeoapi/provider/elasticsearch_.py @@ -266,7 +266,8 @@ class ElasticsearchProvider(BaseProvider): sp = sort['property'] - if self.fields[sp]['type'] == 'string': + if (self.fields[sp]['type'] == 'string' + and self.fields[sp].get('format') != 'date'): LOGGER.debug('setting ES .raw on property') sort_property = '{}.raw'.format(self.mask_prop(sp)) else: