Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-44056

regression in {$meta: "textScore"} projection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.1
    • Component/s: Querying
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Sprint:
      Query 2019-11-18

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: