Giving wrong Sorting order


(narinder.izap) #1

I am applying multiple sorting, on code, city and then name.The codes are:

AK
AL
AR
AZ
BH
...................
ZK

So expected result is that the document with AK should come first, then AL,
then AR AND then AZ and so on...

but the sorting order is AL,AK,AZ,AR....
can you tell me the reason? does sorting work only on first alphabet??


(Clinton Gormley) #2

Hi Narinder

So expected result is that the document with AK should come first,
then AL, then AR AND then AZ and so on...

but the sorting order is AL,AK,AZ,AR....
can you tell me the reason? does sorting work only on first alphabet??

This should work. Please gist a complete example demonstrating the
issue. See http://www.elasticsearch.org/help for a guide to gisting
examples.

clint


(system) #3