if your result set is not small, you can add a callback to update a
special column you can then use reliably for sorting...
jon
blog:
http://technicaldebt.com
twitter:
http://twitter.com/JonKernPA
Brian Hempel said the following on 6/22/12 5:56 PM:
> If your result set is small, you can sort it in Ruby.
>
> The reason Mongo sorts that way is because of how its indexes are
> implemented. The indexes probably look like...
>
> == my_docs.animal ==
> armadillo -> doc2
> cat -> doc5
> dog -> doc5
> zebra -> doc2
>
> �w/no information about array position. Based on the docs, it looks
> like this is your only option for Array indexing�
>
>
http://www.mongodb.org/display/DOCS/Multikeys
>
> �but the Mongo list might give you better advice.