Skip to content

Commit 7c510f6

Browse files
author
Yanlong Wang
committed
Limit query sync to 50 records.
1 parent 17dc2af commit 7c510f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongoosastic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ module.exports = function Mongoosastic(schema, options) {
536536
if (_.isEmpty(finalCondition)) {
537537
finalCondition = origCondition;
538538
}
539-
this.model.find(finalCondition, function (err, results) {
539+
this.model.find(finalCondition).limit(50).exec(function (err, results) {
540540
if (err) {
541541
return
542542
}

0 commit comments

Comments
 (0)