Alphanumeric sort order: a-z then 0-9


(Mark) #1

We have a field "name" (mapping with type "keyword") and have the following two items:

  • car
  • 01bike

Now, when I use
sort: [{ name: {order: asc}}]
in my query, I get

  • 01bike
  • car

What I want is to have a-z first and then the numbers, i.e.

  • car
  • 01bike

Can anyone point me in the right direction how to achieve this? Thank you!


(system) #2

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