[DOCS-6004] Comment on: "manual/reference/operator/query/in.txt" Created: 10/Aug/15  Updated: 03/Nov/17  Resolved: 26/Aug/15

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

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Won't Fix Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: http://docs.mongodb.org/manual/reference/operator/query/in/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36
Referrer: https://www.google.co.uk/
Screen Resolution: 2560 x 1440
repo: docs
source: reference/operator/query/in


Participants:
Days since reply: 8 years, 25 weeks, 1 day ago

 Description   

It would be really useful to distinguish that the $in operator only works in the $match stage, and not in $project.



 Comments   
Comment by Kay Kim (Inactive) [ 26/Aug/15 ]

While we don't specify where each query operator can be used, we do specify that:

$match takes a document that specifies the query conditions. The query syntax is identical to the read operation query syntax.

as well as

$match uses standard MongoDB queries.

Whereas for $project, we do specify that with
<field>: <expression>
the expression is linked to aggregation expressions (which lists the accepted aggregation expressions)
http://docs.mongodb.org/manual/meta/aggregation-quick-reference/#aggregation-expressions

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