Im having trouble getting sort to work correctly in my query. I have tried a very simple example and get some unexpected results.
Query
{
"query": {
"match_all": {}
},
"sort": "name"
}
The result is that the names with numbers in come higher than those without. For example Eurosport 1
will come before Animal Planet
.
"sort": [
"1"
]
and
"sort": [
"a"
]
Is whats returned for each respectively.
Do I need something extra to have sort treat the fields as strings for sorting?
I can post more of the responses if its relevant.