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

Add ability to project key names as values and values as key names

    XMLWordPrintable

    Details

      Description

      Aggregation framework could be a powerful way to transform one shape of document schema into another if values could be turned into keys and vice versa.

      Example schema:

      { userId: "xxx", attributeName: "yyy", attributeValue: "zzz"}

      could be projected into

      { userId: "xxx", "yyy": "zzz"}

      for a subset of attribute names where now we can do simple $match for our criteria.

      Conversely, ability to turn keys into values would allow aggregation based on existence of certain keys.
      It would also allow aggregating by key rather than by value.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                28 Vote for this issue
                Watchers:
                32 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: