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

regression in {$meta: "textScore"} projection

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Minor Change
    • ALL
    • Query 2019-11-18

      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.

            Assignee:
            ian.boros@mongodb.com Ian Boros
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: