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

Allow creating/using dollar-sign prefixed field names

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.0-rc2
    • Component/s: Aggregation Framework
    • None
    • Minor Change

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            andre.spiegel@mongodb.com Andre Spiegel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: