Friday 21 April 2017

find method not works for dates

I am accessing documentdb via mongoose driver from nodejs.

db.recordingModel.find(
    {
        dateRecorded :
            {
                "$gte": new Date("2015-10-01T00:00:00.000Z")
            }

        // status:"sync_error"

    }, function(err, results) {
        console.log(results);
        console.log(err);
    });

I got next error -

{ [MongoError: cursor does not exist, was killed or timed out]
  name: 'MongoError',
  message: 'cursor does not exist, was killed or timed out' }

If I access any other field all works ok. What's wrong with this query ? Thanks.



via Anton Putau

No comments:

Post a Comment