[SERVER-33510] Add shorthand syntax for $convert Created: 27/Feb/18  Updated: 29/Oct/23  Resolved: 01/Mar/18

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 3.7.3

Type: Task Priority: Major - P3
Reporter: Ian Whalen (Inactive) Assignee: Charlie Swanson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-11380 Docs for SERVER-33510: Add shorthand ... Closed
Duplicate
is duplicated by SERVER-11400 Need a type conversion mechanism to c... Closed
is duplicated by SERVER-24947 Need a type conversion mechanism for ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2018-03-12
Participants:

 Comments   
Comment by Asya Kamsky [ 07/Apr/18 ]

ankitujj@gmail.com support questions like this are best asked on MongoDB users Google group.

Comment by Ankit Rathore [ 04/Apr/18 ]

is there any work around for this in the current mongo version 3.6 , till this fix released. i am struggling with this issue . Any help will be much appreciated. i need to select converted integer value from a string in '$project' stage and i have to compare this value in '$match' stage for $gt and $lt comparison.

for example
db.employee.aggregate(
{$project: {empID:

{'$toInt' : '$id'}

, empName:'$name'},
{$match:{ empID:

{'$gt':100}

}}
)

Comment by Githook User [ 01/Mar/18 ]

Author:

{'email': 'charlie.swanson@mongodb.com', 'name': 'Charlie Swanson', 'username': 'cswanson310'}

Message: SERVER-33510 Add shorthand syntax for $convert
Branch: master
https://github.com/mongodb/mongo/commit/2a4328dca297c8c1f76dafcff958c75703881207

Generated at Thu Feb 08 04:33:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.