collection.map_reduce method fails when :raw option is specified

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.4.0
    • Affects Version/s: 1.3.1
    • Component/s: None
    • None
    • Environment:
      Linux
    • None
    • Major Change
    • None
    • None
    • None
    • None
    • None
    • None

      The commit (8887402ca81f3d4c63c10126577861711475e80c) changed the way options are treated, but that resulted in passing :raw parameter to the server which results in a failure with the error:

      Database command 'mapreduce' failed:

      {"ok"=>0.0, "errmsg"=>"unknown m/r field for sharding: raw"}

      (Mongo::OperationFailure)
      /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.3.1/lib/mongo/db.rb:506:in `command'
      /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.3.1/lib/mongo/collection.rb:576:in `map_reduce'

      I've sent a github pull request with the fix.

              Assignee:
              Kyle Banker (Inactive)
              Reporter:
              Kent Sibilev
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: