Numeric sorting in string field

Even though field is String and can have something other than digits, we would like it sorted numerically.

  • numeric numbers sorted numerically first
  • anything non-numeric at the end including the empty ones

Looks like this is common problem but i have hard time finding solution. is there anything built in elastic search to solve this problem? any ideas how this can be solved?

1
2
3
10
11
20
21
30
32
2001
1 to 10
1, 2, 5
1A
2B
8(1)
bailey
Boffey
Book 1 to 10
Book H873/2
BROWN

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