Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
None
-
None
-
Empty show more show less
Description
Hi ,
This is my query. It started giving an error after mongo driver update. I am getting "MongoError: Can't canonicalize query: BadValue must have $meta projection for all $meta sort keys"
My query
dbconnectionManager.getConnection().collection('abc').find({ |
$text: {$search: searchText}},{score: {$meta: "textScore"}}) |
.sort({score:{$meta:"textScore"} |
}).toArray(function(err, result) { |
if (err) { |
console.error("Error occurred while fetching by text." + err); |
callback(err, null); |
} else { |
callback(null, result); |
}
|
});
|
Attachments
Issue Links
- is related to
-
NODE-1359 Positional ($) projection not working properly in v3?
-
- Closed
-