Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8441029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:27:31+00:00 2026-06-10T08:27:31+00:00

In all of the MongoDB MapReduce examples that I can find, output is formatted

  • 0

In all of the MongoDB MapReduce examples that I can find, output is formatted like this:

{ "_id" : ..., "value" : { "v1" : ..., "v2" : ..., "vn" : ... } }

I would like to know if it is possible to write a MapReduce command to instead format output like this:

{ "_id" : ..., "v1" : ..., "v2" : ..., "vn" : ... }

If so, what is the best way to accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:27:32+00:00Added an answer on June 10, 2026 at 8:27 am

    This is not possible due to the way MR actually writes out.

    It writes out to a value field, the same rules apply as they did of this question here: In MongoDB mapreduce, how can I flatten the values object?. To save you from having to click on two links here is the JIRA for your functionality: https://jira.mongodb.org/browse/SERVER-2517

    Of course you could always run some post-processing function after the MR to change the way the collection looks but this is normally unperformant and slow method to do something you could easily handle in your queries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all, I'm very new to mongodb, mongoose and node.js. I would like to
I'm using MapReduce in MongoDB, and I think I've wrapped my head around all
If I perform the following query in MongoDB shell, all is fine: db.users.find({location: {$near:
I have 10000 documents in one MongoDB collection. I'd like to update all the
Let's assume that I have a collection in mongodb, where all of its documents
I was following this tutorial : http://pronewb.com/mongodb-as-in-humongous-not-retarded . All was well until the I
Say I have a collection of users like this:- { _id : 1234, Name
I am beginning with mongodb and have a collection with documents that look like
I've found this discussion: MongoDB: Terrible MapReduce Performance . Basically it says try to
Is there a distinct winner among all the key-value stores? Cassandra, MongoDB, CouchDB? and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.