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

aggregation converts regex values to strings in result set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.2
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL

      Description

      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
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: