# Alphanumeric sort order: a-z then 0-9

**URL:** <https://discuss.elastic.co/t/alphanumeric-sort-order-a-z-then-0-9/85107>\
**Category:** Elasticsearch\
**Created:** [May 9, 2017, 2:02pm UTC](https://discuss.elastic.co/t/alphanumeric-sort-order-a-z-then-0-9/85107 "2017-05-09T14:02:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmpro](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@mmpro](https://discuss.elastic.co/u/mmpro)\
**Post date:** [May 9, 2017, 2:02pm UTC](https://discuss.elastic.co/t/alphanumeric-sort-order-a-z-then-0-9/85107/1 "2017-05-09T14:02:23Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 6, 2017, 2:16pm UTC](https://discuss.elastic.co/t/alphanumeric-sort-order-a-z-then-0-9/85107/2 "2017-06-06T14:16:11Z")

</div>

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