-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Currently, create_index() takes either a string, a symbol, or array of arrays.
The string or symbol will create an ascending index on the key provided. The array of arrays is used to specify pairs of [key, direction/type].
This was created to avoid the use of BSON::OrderedHash in Ruby 1.8.x which would be required to maintain ordering (important here) if a plain old Ruby hash was used instead.
I propose we add the hash style index specifier and deprecate arrays of arrays as most users are on 1.9.x at this point and will most likely benefit from this change.