This is more for me to find again in the future than a question as I've got stuck on this issue twice now!
When searching using Examine and sorting results by a field that is not a string (in my case an integer) you need to tell the query the field is an integer, and don't rely on the ExamineIndex.config definition being enough. Without this it will sort by the field but the string representation of the numbers. The new SortableField is what is required here.
Sortable Examine results
Hi,
This is more for me to find again in the future than a question as I've got stuck on this issue twice now!
When searching using Examine and sorting results by a field that is not a string (in my case an integer) you need to tell the query the field is an integer, and don't rely on the ExamineIndex.config definition being enough. Without this it will sort by the field but the string representation of the numbers. The new SortableField is what is required here.
is working on a reply...