-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Querying, Text Search
-
Fully Compatible
-
ALL
The functional spec states:
If the operator encounters a document where the named field already exists, the operator will replace that field's value
However, the opposite occurs:
> db.articles.find() { "_id" : 1, "subject" : "cake", "score" : 10 } { "_id" : 2, "subject" : "cakes and ale", "score" : 5 } { "_id" : 3, "subject" : "cakes and more cake", "score" : 6 } > db.articles.find( { $text: { $search: "coffee cake" } }, { score: { $meta: "text" } } ) { "_id" : 3, "subject" : "cakes and more cake", "score" : 6, "score" : 6 } { "_id" : 2, "subject" : "cakes and ale", "score" : 5, "score" : 5 } { "_id" : 1, "subject" : "cake", "score" : 10, "score" : 10 }
- duplicates
-
SERVER-12238 Projecting {$meta: "textScore"} over existing fields creates a duplicate key
- Closed