# Sorting on custom date field, error 500

**URL:** <https://community.graylog.org/t/sorting-on-custom-date-field-error-500/6904>\
**Category:** Graylog Central (peer support)\
**Created:** [September 19, 2018, 4:48pm UTC](https://community.graylog.org/t/sorting-on-custom-date-field-error-500/6904 "2018-09-19T16:48:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![madi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/madi/32/396_2.png) [@madi](https://community.graylog.org/u/madi)\
**Post date:** [September 19, 2018, 4:48pm UTC](https://community.graylog.org/t/sorting-on-custom-date-field-error-500/6904/1 "2018-09-19T16:48:51Z")

</div>

Hello,

I have a problem with sorting on a custom date field i have created:

> Error Message:
> 
> Unable to perform search query No mapping found for [test2] in order to sort onNo mapping found for [test2] in order to sort on
> 
> Details:
> 
> - `No mapping found for [test2] in order to sort on`
> - `No mapping found for [test2] in order to sort on`
> 
> Search status code:
> 
> 500
> 
> Search response:
> 
> cannot GET https:/myserver:12900/api/search/universal/relative?query=%2A&range=300&filter=streams%3A5a73566e1ab162ca37c9b298&limit=150&sort=test2%3Adesc (500)

I create the field using extractor and converter:

> 2018-09-19 18:00:27,878 CEST SOME log thingy

parsed to field “test2” as 2018-09-19 18:00:27,878 and converted using date converter with pattern: yyyy-MM-dd HH:mm:ss,SSS

I see the field type as time in Kibana, I can sort with this field in Kibana. When I try to sort in Graylog i get this error. Nothing shows up in server logs after that

Graylog 2.4.6+ceaa7e4

---

<div class="post-metadata">

**Author:** ![madi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/madi/32/396_2.png) [@madi](https://community.graylog.org/u/madi)\
**Post date:** [September 24, 2018, 12:33pm UTC](https://community.graylog.org/t/sorting-on-custom-date-field-error-500/6904/2 "2018-09-24T12:33:04Z")

</div>

Solved:

The main problem were old indexes with wrong ranges. Recalculating did the job. Another thingy may be mapping, can be checked via curl -X GET ‘[http://elastic1:9200/graylog\_deflector/\_mapping?pretty](http://elastic1:9200/graylog_deflector/_mapping?pretty)’ and so on

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [October 8, 2018, 12:33pm UTC](https://community.graylog.org/t/sorting-on-custom-date-field-error-500/6904/3 "2018-10-08T12:33:05Z")

</div>

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