# Sort alphanumeric values of a field

**URL:** <https://discuss.elastic.co/t/sort-alphanumeric-values-of-a-field/96505>\
**Category:** Elasticsearch\
**Created:** [August 9, 2017, 8:20pm UTC](https://discuss.elastic.co/t/sort-alphanumeric-values-of-a-field/96505 "2017-08-09T20:20:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jth1](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jth1](https://discuss.elastic.co/u/jth1)\
**Post date:** [August 9, 2017, 8:20pm UTC](https://discuss.elastic.co/t/sort-alphanumeric-values-of-a-field/96505/1 "2017-08-09T20:20:09Z")

</div>

When applied sort ascending the values bp1, bp3, bp20, bp2, bp31, bp10, the order returned is bp1, bp10, bp2, bp20, bp3, bp31.

I wanted it to be ordered like bp1, bp2, bp2, bp10, bp20, bp31. How can I achieve this?

---

<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:** [September 6, 2017, 8:20pm UTC](https://discuss.elastic.co/t/sort-alphanumeric-values-of-a-field/96505/2 "2017-09-06T20:20:13Z")

</div>

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