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

Allow mapReduce to create full documents

    Details

    • 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
          confessin Mohammad Rafi added a comment -

          +1

          Show
          confessin Mohammad Rafi added a comment - +1
          Hide
          tubededentifrice Vincent added a comment -

          Can't believe it can't be done already... through the finalize function, it would be SO easy...

          Show
          tubededentifrice Vincent added a comment - Can't believe it can't be done already... through the finalize function, it would be SO easy...
          Hide
          jeffwhelpley Jeff Whelpley added a comment -

          +1 There are so many uses for this functionality if it existed. At a high level, it makes it much easier to synchronize de-normalized data.

          Show
          jeffwhelpley Jeff Whelpley added a comment - +1 There are so many uses for this functionality if it existed. At a high level, it makes it much easier to synchronize de-normalized data.
          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.

            Dates

            • Created:
              Updated:
              Days since reply:
              5 weeks, 4 days ago
              Date of 1st Reply: