I have a search result webpart (the same problem happens with a Search Query Webpart thay queries the same content) that looks for calendarevents later than today.
I searches through four calendars on a different application than the one that presents it.
This is the Query:
path:"http://Site/A/Lists/Kalender" OR path:"http://Site/B/Lists/Kalender" OR path:"http://Site/C/Lists/Kalender" OR path:"http://Site/D/Lists/Kalender" (IsDocument:"True" OR contentclass:"STS_ListItem") EventDate>={Today}
The Query correctly finds 6 events.
I then want to sort the by EventDate. EventDate is a Date/Time field, is queriable, searchable, retrievable, refinable and sortable and mapped to crawled property "ows_EventDate".
I've added this JSON to the sort order code in the search result webpart, so that I can easily test, whether the sorting Works:
[{"name":"Relevans","sorts":[]},{"name":"Event date","sorts":[{"p":"EventDate","d":0}]},{"name":"Date (oldest)","sorts":[{"p":"Write","d":0}]}]
When I see the results and change the sorting to "Event Date", it resorts, but doesn't do it correctly:
Result A
Eventdate: Tue Dec 15 10:30:00 UTC+0100 2015
Created: Mon Oct 26 15:28:20 UTC+0100 2015
Site/A/Lists/Kalender/DispForm.aspx?ID=4
Result 2
Eventdate: Fri Dec 4 09:00:00 UTC+0100 2015
Created: Tue Oct 13 14:37:44 UTC+0200 2015
Site/C/Lists/Kalender/DispForm.aspx?ID=1
Result 3
Eventdate: Fri Dec 11 15:00:00 UTC+0100 2015
Created: Tue Oct 13 15:55:23 UTC+0200 2015
Site/A/Lists/Kalender/DispForm.aspx?ID=3
If I create a new event, it'll end up at the top regardless of the date of the event.