Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-461

Improve the index creation interface

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 12_01_17
    • 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.

            Assignee:
            spf13 Steve Francia
            Reporter:
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: