Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2517

Allow mapReduce to create full documents

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Component/s: MapReduce
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      This is a follow up to a support thread: http://groups.google.com/group/mongodb-user/browse_thread/thread/7e1f16c81940c24b

      Please allow mapReduce jobs to optionally return full documents instead of placing the result into the value field.

      The _id of the documents would be the reduction key, but the returned value from reduce (or finalize) would be required to be a hash. This makes working with a permanent collection generated by a map/reduce job much nicer.

      I suggest that a new out option be added:

      out:

      {document: 1}

        Issue Links

          Activity

          Hide
          kay Kay Fleischmann added a comment -

          +1 Definitly a must have.

          Show
          kay Kay Fleischmann added a comment - +1 Definitly a must have.
          Hide
          vipseixas Vinicius Seixas added a comment -

          +1
          I am using Spring Data for MongoDB and I have to create a dummy Value class just for holding the values intead of putting them directly in the main document class.

          Show
          vipseixas Vinicius Seixas added a comment - +1 I am using Spring Data for MongoDB and I have to create a dummy Value class just for holding the values intead of putting them directly in the main document class.
          Hide
          ibeaver Ian Beaver added a comment -

          +1 making this configurable would allow MR jobs to merge documents back into collections that were not originally created by a MR job.

          Show
          ibeaver Ian Beaver added a comment - +1 making this configurable would allow MR jobs to merge documents back into collections that were not originally created by a MR job.
          Hide
          unbornchikken Gabor Mezo added a comment -

          +100

          Show
          unbornchikken Gabor Mezo added a comment - +100
          Hide
          kestes Kyle Estes added a comment -

          For what it is worth, this is the very first time I used the map-reduce functionality of MongoDB, and I found myself here.

          Show
          kestes Kyle Estes added a comment - For what it is worth, this is the very first time I used the map-reduce functionality of MongoDB, and I found myself here.

            Dates

            • Created:
              Updated:
              Days since reply:
              1 day ago
              Date of 1st Reply: