molecuel / mongolastic

Mongolastic - Mongoose middleware for elasticsearch integration
MIT License
8 stars 4 forks source link

Add a check function for elastic.bulk #10

Open DominicBoettger opened 9 years ago

DominicBoettger commented 9 years ago

On line 607 and line 622 elastic.bulk(bulk, function(err) {

in function mongolastic.prototype.sync = function sync(model, modelname, callback) {

is a check for the array length needed. If the array is 0 a exception will be thrown.