[SERVER-26461] $meta : "textScore" returns null when used inside $group in aggregation and no other fields are needed Created: 05/Oct/16 Updated: 19/Nov/16 Resolved: 14/Oct/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 3.3.15 |
| Fix Version/s: | 3.4.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jai Hirsch | Assignee: | Charlie Swanson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
|||||||||||||||
| Issue Links: |
|
|||||||||||||||
| Backwards Compatibility: | Fully Compatible | |||||||||||||||
| Operating System: | ALL | |||||||||||||||
| Steps To Reproduce: |
|
|||||||||||||||
| Sprint: | Query 2016-10-31 | |||||||||||||||
| Participants: | ||||||||||||||||
| Case: | (copied to CRM) | |||||||||||||||
| Linked BF Score: | 0 | |||||||||||||||
| Description |
|
Our work to optimize $group to take advantage of COUNT_SCAN plans accidentally introduced this regression. Specifically, this change made it so that we will no longer request the text score from the query system if our only dependency is the text score. Original Description$meta : "textScore" returns null when used inside $group in aggregation under 3.3.15:
Attached is a script repro.js that reproduces this problem. The behavior is correct on 3.2.10 and 3.0.12 where the same aggregation returns:
If $meta : "textScore" is used in $project, it works fine:
as well as if used in find():
The example is from https://docs.mongodb.com/v3.2/reference/operator/aggregation/meta/#examples |
| Comments |
| Comment by Githook User [ 14/Oct/16 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}Message: |
| Comment by Charlie Swanson [ 14/Oct/16 ] |
|
Re-opening since I accidentally broke the build. |
| Comment by Githook User [ 14/Oct/16 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'cswanson310@gmail.com'}Message: |
| Comment by Charlie Swanson [ 07/Oct/16 ] |
|
Thanks for the report jaihirsch@carfax.com! I've tracked down the problem and updated the description accordingly. |