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

Support $meta project and sort

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.10.0
    • Affects Version/s: 1.10.0
    • Component/s: None
    • None

      The ruby driver assumes that a field list specified to #find includes key names that should be included in the projected output. It converts these fields to a hash of the form {:field1 => 1, :field2 => 1}

      Changes needed:
      1) In the case that the list includes

      {"score" => {"$meta" => 'textScore'}}
      

      the driver needs to allow it to pass through unchanged. Right now it incorrectly converts it to

      {{"score" => {"$meta" => "textScore"}}=>1}
      

      2) Similarly, for sort,

      {"score" => {"$meta" => "textScore"}}
      

      should be an acceptable sort value. Values are now limited to Mongo::Conversions::ASCENDING_CONVERSION and Mongo::Conversions::DESCENDING_CONVERSION

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            emily.stolfo Emily Stolfo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: