[SERVER-12488] $meta: 'textScore' yields 0 rather than missing in the first stage of a pipeline Created: 27/Jan/14  Updated: 11/Jul/16  Resolved: 11/Feb/14

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: 2.5.4
Fix Version/s: 2.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: Matt Dannenberg Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

 db.foo.aggregate([{$project: {_id: 1, score: {$meta: 'textScore'}}}])

A score field will appear with the value 0 instead of being absent.



 Comments   
Comment by Githook User [ 11/Feb/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-12488 Assume we don't need textScore if not doing text query

This means we won't ask the query framework for the score since there
shouldn't be any. This ensures that results for missing text scores are
consistent with missing fields.
Branch: master
https://github.com/mongodb/mongo/commit/19820f5a435e4dfedef65b37089e5ed673bcc393

Generated at Thu Feb 08 03:28:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.