# Sorting a house number field

**URL:** <https://discuss.elastic.co/t/sorting-a-house-number-field/312194>\
**Category:** Elasticsearch\
**Created:** [August 16, 2022, 2:05pm UTC](https://discuss.elastic.co/t/sorting-a-house-number-field/312194 "2022-08-16T14:05:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolai\_Jee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicolai_jee/32/98662_2.png) [@Nicolai\_Jee](https://discuss.elastic.co/u/Nicolai_Jee)\
**Post date:** [August 16, 2022, 2:05pm UTC](https://discuss.elastic.co/t/sorting-a-house-number-field/312194/1 "2022-08-16T14:05:05Z")

</div>

Hi  
I have a house number field that contains stringbased data like 1,2A,3,3B,10,100A.  
Right now it is a basic textfield and it does string sorting, which is not working for me.  
I need it to sort numerically and then alphabetically on the field.  
How can I best achieve that ?

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [August 16, 2022, 3:05pm UTC](https://discuss.elastic.co/t/sorting-a-house-number-field/312194/2 "2022-08-16T15:05:18Z")

</div>

HI @Nicolai_Jee

Are there any restrictions? Can you manipulate the data before indexing?  
I imagined adding two fields one for the number and one for the letter and sort using multilevel.

---

<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 13, 2022, 3:06pm UTC](https://discuss.elastic.co/t/sorting-a-house-number-field/312194/3 "2022-09-13T15:06:12Z")

</div>

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