{"record":{"id":"4ce126c2660bb4c7","repo":"mongodb/mongoid","slug":"no-output-location-was-specified-for-the-map-reduc","errorCode":null,"errorMessage":"No output location was specified for the map/reduce operation.","messagePattern":"No output location was specified for the map/reduce operation\\.","errorType":"exception","errorClass":"Mongoid::Errors::NoMapReduceOutput","httpStatus":null,"severity":"error","filePath":"lib/mongoid/contextual/map_reduce.rb","lineNumber":224,"sourceCode":"  class:    #{criteria.klass}\n  map:      #{command[:map]}\n  reduce:   #{command[:reduce]}\n  finalize: #{command[:finalize]}\n  out:      #{command[:out].inspect}>\n)\n      end\n\n      # Returns the selector of the command spec.\n      #\n      # @return [ Hash ] The selector.\n      def command\n        @map_reduce.send(:map_reduce_spec)[:selector]\n      end\n\n      private\n\n      def validate_out!\n        raise Errors::NoMapReduceOutput.new({}) unless @map_reduce.out\n      end\n\n      def _session\n        criteria.send(:_session)\n      end\n    end\n  end\nend\n","sourceCodeStart":206,"sourceCodeEnd":233,"githubUrl":"https://github.com/mongodb/mongoid/blob/0da0e23d71adfbad31128c18e5e2c8c301c6f7c4/lib/mongoid/contextual/map_reduce.rb#L206-L233","documentation":"Error \"No output location was specified for the map/reduce operation.\" thrown in mongodb/mongoid.","triggerScenarios":"Thrown at lib/mongoid/contextual/map_reduce.rb:224 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0da0e23d71adfbad31128c18e5e2c8c301c6f7c4","analyzedAt":"2026-08-23T06:25:47.656Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}