Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCSP-27227 Clarify MongoDB Aggregation in Compass Filter Doc #609

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

kanchana-mongodb
Copy link
Contributor

@kanchana-mongodb kanchana-mongodb commented Mar 11, 2024

DESCRIPTION

The documented MongoDB aggregation in the example doesn't work. I tested and got an error:

Atlas atlas-l1dbhc-shard-0 [primary] my_test> db.users.aggregate(
...   { $filter : { name : { $eq : "Andrea Le" } } }
... );
MongoServerError[AtlasError]: $filter is not allowed or the syntax is incorrect

Tested example suggested in the ticket and modified example accordingly:

Atlas atlas-l1dbhc-shard-0 [primary] my_test> db.users.aggregate({$match: {"name": "Andrea Le"}})
[
  {
    _id: ObjectId('65ef30aa6f0e4dfbf15d143d'),
    name: 'Andrea Le',
    email: '[email protected]',
    version: 5,
    scores: [ 85, 95, 75 ],
    dateCreated: ISODate('2003-03-26T00:00:00.000Z')
  }
]

STAGING

https://preview-mongodbkanchanamongodb.gatsbyjs.io/compass/DOCSP-27227/query/filter/#how-does-the-compass-query-compare-to-mongodb-and-sql-queries-

JIRA

https://jira.mongodb.org/browse/DOCSP-27227

BUILD LOG

https://workerpool-boxgs.mongodbstitch.com/pages/job.html?collName=queue&jobId=65ef341a6fc5f048506d1d43

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Is this free of spelling errors?
  • Is this free of grammatical errors?
  • Is this free of staging / rendering issues?
  • Are all the links working?

External Review Requirements

What's expected of an external reviewer?

Copy link
Collaborator

@jmd-mongo jmd-mongo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this fix, @kanchana-mongodb! This one LGTM.

Thank you,
Joe

@kelly-cs
Copy link

LGTM. Thanks for the edit!

@sarah-olson-mongodb sarah-olson-mongodb merged commit 988d0b8 into mongodb:master Mar 19, 2024
1 check passed
@docs-builder-bot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants