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

Allow user to choose whether to wrap MapReduce results inside "value"-attribute of result

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.0, 1.4.1, 1.5.0
    • Component/s: Querying
    • None
    • Environment:
      n/a

      MapReduce queries in the current version always returns a result that contains documents that look like {"_id":something, "value":{...}}. In this format, the documents that result from the reduce (and finalize) function are wrapped inside the "value" attribute. This is nice if you want to output documents (which contain their own "_id" that would otherwise clash with the _id in the result set). Sometimes, however, I am returning plain objects or objects of which the _id has been stripped, and it would be nice to not have the extra "value" wrapper.

      Although querying result sets that contain the 'value' wrapper is possible, it becomes a bit clumsy (especially since the column names differ from the collection I ran the MapReduce on).

      So my feature request is to add an option that disables the wrapping of results inside the 'value' attribute. If the wrapping is disabled, the _id could also be automatically removed to prevent mistakes.

            Assignee:
            Unassigned Unassigned
            Reporter:
            tommyvdv Tommy V
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: