[SERVER-12238] Projecting {$meta: "textScore"} over existing fields creates a duplicate key Created: 02/Jan/14  Updated: 10/Dec/14  Resolved: 03/Jan/14

Status: Closed
Project: Core Server
Component/s: Querying, Text Search
Affects Version/s: 2.5.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Tyler Brock Assignee: J Rassi
Resolution: Duplicate Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-12129 $meta projection operator should over... Closed
Related
Operating System: ALL
Steps To Reproduce:

> db.test.find(
    { $text: { $search: "dog" } },
    { _id: { $meta: "textScore" } }
)
{
  "_id": 2,
  "words": "dog cat",
  "_id": 2
}

Participants:

 Description   

When projecting the {$meta: "textScore"} field over _id the resulting documents contain two _id fields which is impossible in javascript as keys in objects must be unique. Something is wrong here.



 Comments   
Comment by J Rassi [ 03/Jan/14 ]

dup of SERVER-12129

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