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

Complex key support for group command

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.0
    • Affects Version/s: None
    • Component/s: Usability
    • None

      I'd like to be able to use complex (dotted-notation) keys such as "run.date" with the group command.

      Ideally I could also do something like this where a key matches wherever a condition would:

      insert( {a:[

      {b:1}

      ,

      {b:2}

      ,

      {b:3}

      ]}
      insert( {a:[

      {b:2}

      ,

      {b:3}

      ,

      {b:4}

      ]}
      insert( {a:[

      {b:3}

      ,

      {b:4}

      ,

      {b:5}

      ]}

      group({key:

      {"a.b":true}

      , reduce:some_count_func})
      ["a.b": 1, count:1]
      ["a.b": 2, count:2]
      ["a.b": 3, count:3]
      ["a.b": 4, count:2]
      ["a.b": 5, count:1]

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: