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

Allow creating/using dollar-sign prefixed field names

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.6.0-rc2
    • Fix Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change

      Description

      It is currently not possible to handle field names with dollar signs in aggregation (e.g. in $project). However, there are cases where this is perfectly valid, e.g. when trying to aggregate over system.profile, where queries and all their operators are treated as data.

      For example, if system.profile contains:

      {"$query" : { "date" : { "$gte" : ISODate("...") } } }

      There is no way to project the $gte field. The only workaround, currently, seems to be to dump the collection to BSON or JSON, and replace "$gte" with "dgte" or something similar, then aggregate over the modified collection.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: