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

    • Query

      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.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            28 Vote for this issue
            Watchers:
            31 Start watching this issue

              Created:
              Updated:
              Resolved: