A Java driver functional test of {$meta: "textScore"} projection recently regressed when running against latest mongod. The regression occurred somewhere between the commit hashes 560b542 and c119ef4.
Test setup:
> db.test.insert({x: 1, y: [{a: 1, b: 2}, {a: 2, b: 3}, {a: 3, b: 4}]}) > db.test.createIndex({y: "text"})
Expected results contain a synthetic score field:
> db.test.find({}, {score: {"$meta": "textScore"}}) { "_id" : ObjectId("5da7cc88458e2388ffaedd5f"), "x" : 1, "y" : [ { "a" : 1, "b" : 2 }, { "a" : 2, "b" : 3 }, { "a" : 3, "b" : 4 } ], "score" : 0 }
Results after the regression omit the score field:
MongoDB Enterprise > db.test.find({}, {score: {"$meta": "textScore"}}) { "_id" : ObjectId("5da7ce30522390ed46b8b869"), "x" : 1, "y" : [ { "a" : 1, "b" : 2 }, { "a" : 2, "b" : 3 }, { "a" : 3, "b" : 4 } ] }
Educated guess is that the fix for SERVER-42423 is the culprit.
- is depended on by
-
JAVA-3465 Address build failure caused by change in behavior of {$meta: "textScore"}
- Closed