-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 6.0.1
-
Component/s: None
-
Labels:None
-
ALL
-
If I run the example here: https://www.mongodb.com/docs/manual/reference/operator/aggregation/lastN/#computing-n-based-on-the-group-key-for–group, I get the following results:
{ "_id" : \{ "gameId" : "G1" }, "gamescores" : [ 33, 99, 1 ] }
{ "_id" : \{ "gameId" : "G2" }, "gamescores" : [ 80 ] }
But the docs show, correctly, that for G2 there should be only a 10 there. I'm literally using the 'copy' action on the page and pasting in to my local shell and getting those results. Am I tripping or is there a bug here?
server build info as follows:
db.serverBuildInfo()
{
"version" : "6.0.1",
"gitVersion" : "32f0f9c88dc44a2c8073a5bd47cf779d4bfdee6b",
"targetMinOS" : "Windows 7/Windows Server 2008 R2",
"modules" : [ ],
"allocator" : "tcmalloc",
"javascriptEngine" : "mozjs",
"sysInfo" : "deprecated",
"versionArray" : [
6,
0,
1,
0
],
"openssl" :
,
"buildEnvironment" :
,
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"storageEngines" : [
"devnull",
"ephemeralForTest",
"wiredTiger"
],
"ok" : 1
}
- is related to
-
DOCS-15592 [Server] Error in $lastN (aggregation accumulator)
- Closed