Closed Gionni closed 10 years ago
I'm not sure if pagination is possible with mongoose-text-search.
In my local mongo 2.6, I put all the find options together using this from node/mongoose:
var query = Contact.find(findOpt); query.count(function(err, count) { query.skip((req.query.page-1)*numContactsPerPage).limit(numContactsPerPage). exec('find', function(err, contacts) { ... }); });
But now using conservative mongolab/mongohq mongo 2.4, I don't know how to do it.
Any suggestion? Thanks.
Mongo 2.4 didn't support paging text search results.
I'm not sure if pagination is possible with mongoose-text-search.
In my local mongo 2.6, I put all the find options together using this from node/mongoose:
var query = Contact.find(findOpt); query.count(function(err, count) { query.skip((req.query.page-1)*numContactsPerPage).limit(numContactsPerPage). exec('find', function(err, contacts) { ... }); });
But now using conservative mongolab/mongohq mongo 2.4, I don't know how to do it.
Any suggestion? Thanks.