Skip to content

Commit 87463e1

Browse files
committed
PERF-1568 limit $geoNear results to 100 documents
(cherry picked from commit 6140701)
1 parent a4ffd8a commit 87463e1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

testcases/pipelines.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,10 @@ generateTestCase({
230230
boolFilter: true
231231
}
232232
}
233-
}
233+
},
234+
// For $geoNear, we limit the number of results to 100 documents, to match the default
235+
// behavior the $geoNear stage prior to 4.2.
236+
{$limit: 100},
234237
]
235238
});
236239

@@ -259,7 +262,10 @@ generateTestCase({
259262
},
260263
spherical: true
261264
}
262-
}
265+
},
266+
// For $geoNear, we limit the number of results to 100 documents, to match the default
267+
// behavior the $geoNear stage prior to 4.2.
268+
{$limit: 100},
263269
]
264270
});
265271

0 commit comments

Comments
 (0)