[DOCS-8346] Comment on: "manual/reference/operator/aggregation/eq.txt" Created: 14/Jul/16  Updated: 03/Nov/17  Resolved: 14/Jul/16

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

Type: Bug Priority: Major - P3
Reporter: Dilip Singh Assignee: Unassigned
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Software, MonogBD Programmer

Location: https://docs.mongodb.com/manual/reference/operator/aggregation/eq/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
Referrer: https://www.google.co.in/
Screen Resolution: 1366 x 768


Participants:
Days since reply: 7 years, 30 weeks, 6 days ago

 Description   

You did not mentioned any where advantage of $eq why we use this operator while we can write directly as "price":200 instead of $eq:

{"Price":200}

.



 Comments   
Comment by Kay Kim (Inactive) [ 14/Jul/16 ]

So, if we look at the example on the page (https://docs.mongodb.com/manual/reference/operator/aggregation/eq/#example) where we use $eq in the projection, I wouldn't use

{ 'price': 200 }

since in the projection stage, that would return for me a field price with the value 200.
Instead, if I just want to know if a certain field equals or not equals some value, we can use $eq.

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