-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.48.2
-
Component/s: None
-
Environment:OS: Windows 11
node.js / npm versions: 22.18.0
Additional info: Error on MongoDB compass (NOT is Mongo extension for VScode)
-
None
-
None
-
Developer Tools
Problem Statement/Rationale
I have a document database with over 92M documents, on which I did a simple query on MQL to get how many times a score is repeated in the database, the query is like this.
db.playsinfo.aggregate([
{$match:{
bggid: 201808,
scoreCount: {$gt: 0{color:#cdd3de}}
}},
{$unwind:{
path: "$scoreInfo"
}},
{$match:{
"scoreInfo.score": {$ne: NaN{color:#cdd3de}}
}},
{$group:{
_id: {score: "$scoreInfo.score"{color:#cdd3de}},
scoreCounting: {$sum: 1{color:#cdd3de}}
}},
])
When I run it in VS Code and MongoDB compass, it returns me different counts when I create and check the query stage by stage
I see the limit configuration and it is 100,000 and says "Note: this setting is only applied for the document previews, it is not applied when the pipeline is run" but I think this warning is not enough, if a developer doesn't know how to search, thinks that the results of the document previews are real when they could not be.
Expected Results
At least a warning on the $group and $bucket stages, saying that not all the documents are being added into the group (when they beyond the limit)
Actual Results
As a developer, I really though that the results in the stage development windows were the truth and I was really confused that I had different results between VSCode and MongoDB, thinking what was the real result, without a warning, I could had deliver wrong results.