[SERVER-44056] regression in {$meta: "textScore"} projection Created: 17/Oct/19 Updated: 29/Oct/23 Resolved: 07/Nov/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Ian Boros |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Query 2019-11-18 | ||||||||||||||||
| Participants: | |||||||||||||||||
| 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:
Expected results contain a synthetic score field:
Results after the regression omit the score field:
Educated guess is that the fix for |
| Comments |
| Comment by Githook User [ 07/Nov/19 ] |
|
Author: {'username': 'puppyofkosh', 'email': 'ian.boros@mongodb.com', 'name': 'Ian Boros'}Message: |
| Comment by Jeffrey Yemin [ 04/Nov/19 ] |
|
Nope, it's fine. We'll just update the test to generate a non-zero text score |
| Comment by Ian Boros [ 04/Nov/19 ] |
|
jeff.yemin I've talked with Asya and Dave and we've all agreed that we'd like to change the behavior of $meta in this case to return "missing" rather 0. In 4.2 and earlier, this behavior was inconsistent between find() and aggregate() and this is an opportunity to unify the behavior of the two just a bit more. Will this backwards breaking change be a big inconvenience for drivers in terms of updating the test? Leaving this ticket assigned to myself. I think the "work" for this should be to create a test for the new behavior of $meta in find() (and update the design doc with the breaking change). CC david.storch |
| Comment by Ian Boros [ 04/Nov/19 ] |
|
On second thought, part of me is tempted to just break this behavior. I'm going to get a few other thoughts first though. |
| Comment by Ian Boros [ 04/Nov/19 ] |
|
jeff.yemin Thanks for catching this! I'm a bit disappointed that our own test suite didn't reveal this problem. It looks like the 4.2 projection executor (known as "ProjectionExec") would just return a default value of 0 when there was no text score associated with the Document. The 4.3/master executor doesn't have this logic. I'll try to get a fix into code review today or tomorrow. |