Sort fields on numeric part, and the alpha part

Hi all,

I am facing the following issue. I have some addresses, and when we sort them on the number, we have a alphanumeric sort. Like :
1
11
2
etc...

My problem is : this number can contains letters or others chars such dot.
Some exemples : NULL, 1, 101, 2b 101a, 102b, d1.1, l1, z, ...

I would like to sort them firstly on their numeric part, and then on their alpha part :
1
2b
101
101a
102b
d1.1
l
z
(or something similar)

How can I do that in Elastic ?
I was looking for splitting my field in differents parts (numeric vs alphanum), and then see if it begins by the num part or the alpha part. Then order it as I can.

I am quite new here, i look at some similar topic but they are just base on 1 caracter so it does not work for me.

Thanks a lot !

Well, I tried to implement my proposition but I can't make it functionnal.

If somebody has an idea :slight_smile:

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