We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to apply the following query to the paginate function, but don't think it works.
var docItems = require('../models/docItems.js'); docItems.find( {$text: {$search: req.query.searchString}} , {score: {$meta: "textScore"}} ) .sort({ score : { $meta : 'textScore' } }) .exec(function(err, results) {
return next(err, results); });
the , {score: {$meta: "textScore"}} line is what is missing in the following code:
docItems.paginate( {$text: {$search: req.query.searchString}, score: {$meta: "textScore"}}, { page: 1, sortBy: { score : { $meta : 'textScore' } }}, function(err, results, pageCount, itemCount) { console.log('hello'); return next(err, results, pageCount, itemCount); });
Is there a way to submit the score meta line? what am i missing?
The text was updated successfully, but these errors were encountered:
@keniiy Haven't tried that. Let me see if this can be fixed.
Sorry, something went wrong.
aravindnc
No branches or pull requests
I am trying to apply the following query to the paginate function, but don't think it works.
var docItems = require('../models/docItems.js');
docItems.find(
{$text: {$search: req.query.searchString}}
, {score: {$meta: "textScore"}}
)
.sort({ score : { $meta : 'textScore' } })
.exec(function(err, results) {
the , {score: {$meta: "textScore"}} line is what is missing in the following code:
docItems.paginate(
{$text: {$search: req.query.searchString}, score: {$meta: "textScore"}},
{ page: 1, sortBy: { score : { $meta : 'textScore' } }},
function(err, results, pageCount, itemCount) {
console.log('hello');
return next(err, results, pageCount, itemCount);
});
Is there a way to submit the score meta line? what am i missing?
The text was updated successfully, but these errors were encountered: