[DOCS-5882] Document string aliases for $type Created: 21/Jul/15  Updated: 11/Jan/17  Resolved: 02/Nov/15

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: Ravind Kumar (Inactive)
Resolution: Done Votes: 0
Labels: docs-3.2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-18819 Allow $type to support type values as... Closed
Related
is related to DOCS-5838 $type operator supports "number" Closed
Participants:
Days since reply: 8 years, 15 weeks, 2 days ago

 Description   

SERVER-18819 introduced string aliases for the $type query operator. Whereas previously you could query for, say, all documents where field a is a NumberLong using

db.coll.find({a: {$type: 18}});

now you can use the much more readable

db.coll.find({a: {$type: "long"}});

The string alias accepted for each BSONType are listed in SERVER-18819. We need to add these to the $type docs here: http://docs.mongodb.org/manual/reference/operator/query/type/

We should also consider updating http://docs.mongodb.org/manual/reference/bson-types/ to list the short names for each type.



 Comments   
Comment by Githook User [ 02/Nov/15 ]

Author:

{u'username': u'rkumar-mongo', u'name': u'ravind', u'email': u'ravind.kumar@10gen.com'}

Message: DOCS-5882 : Updated table to include aliases, restructured document with new examples, removed unrelated sections

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/0c488b60b36bbe0c0b1b4af45dab117d71a933a1

Comment by Ravind Kumar (Inactive) [ 30/Oct/15 ]

https://github.com/mongodb/docs/pull/2404

Comment by Ravind Kumar (Inactive) [ 09/Oct/15 ]

https://mongodbcr.appspot.com/23670001/

Generated at Thu Feb 08 07:51:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.