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

aggregation converts regex values to strings in result set

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.3.2
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Minor Change
    • ALL

      Observed behavior: An aggregation result based on a regular expression from mongod is converted to a string in the result set.
      Expected behavior: The aggregation result is returned as a regular expression type.

      Test:

      > c.save( { a:/x/i } )
      > c.find()
      { "_id" : ObjectId("5004823ca08131138fd399d6"), "a" : /x/i }
      > c.aggregate( { $project:{ b:'$a' } } )
      {
      	"result" : [
      		{
      			"_id" : ObjectId("5004823ca08131138fd399d6"),
      			"b" : "x"
      		}
      	],
      	"ok" : 1
      }
      

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: