I have a field in MongoDB that is a String type. It will contain some combination of letters and numbers like "10", "101", "11", "112", "x115", "abc.5". Right now if I tell MongoDB to sort these it will do an alphabetical sort, ordering as so:
It orders "101" before "11", how could I change the sorting so that numerals are ordered properly?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…