var query = {
$text: { $search: 'abc', $caseSensitive : false}
};
const result = await collection.find(query,{score: { $meta: "textScore" }}).sort( { score: { $meta: "textScore" } }).toArray();
This full text search query is working fine with mongodb 2.2.33, but it does not work when we upgrade to mongodb 3.0.0-rc0.
When I execute that query with mongodb driver 3.0.0-rc0, I got the Error: MongoError: must have $meta projection for all $meta sort keys
If I remove "sort( { score: { $meta: "textScore" } })" ---> mongodb driver 3.0.0-rc0 is working fine.
Can anyone help me on this?