[SERVER-85335] Time-series $meta operator has inconsistent behavior as regular collections Created: 17/Jan/24  Updated: 31/Jan/24

Status: Needs Scheduling
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Yuhong Zhang Assignee: Nishith Atreya
Resolution: Unresolved Votes: 0
Labels: query-product-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Integration
Operating System: ALL
Participants:

 Description   

> db.test.find()
{ "_id" : ObjectId("65a83c879039a5ecd4ae9512"), "time" : ISODate("2024-01-17T20:45:59.439Z") }
> db.test.find({}, {b: {$meta: "sortKey"}}).sort({time: 1})
{ "_id" : ObjectId("65a83c879039a5ecd4ae9512"), "time" : ISODate("2024-01-17T20:45:59.439Z"), "b" : [ ISODate("2024-01-17T20:45:59.439Z") ] }
> db.ts.find()
{ "time" : ISODate("2024-01-17T19:58:09.141Z"), "_id" : ObjectId("65a831518c8d365be92fc88c") }
> db.ts.find({}, {b: {$meta: "sortKey"}}).sort({time: 1})
{ "_id" : ObjectId("65a831518c8d365be92fc88c") } 


Generated at Thu Feb 08 06:57:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.