I need to do alphanumeric sorting in one of the fields in my collection. This field contains chromosome information.
Chr1, Chr2, .., .., .., Chr10, Chr11, .., .., ChrX, ChrY
Instead of getting the values ββin this order, I get them in
Chr1, Chr11
This is a common problem, and it was interesting whether MongoDB has a built-in solution for this kind, or should we crack it, as we usually do in Oracle. If there is no built-in solution, what is the best way to get this view? Natural sorting is an acceptable solution, but I have already applied it to another field.
Any help would be greatly appreciated.
Arun janarthnam
source share