[SERVER-38770] "$type" cannot match array in version 3.4.4 Created: 26/Dec/18  Updated: 26/Dec/18  Resolved: 26/Dec/18

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Shell
Affects Version/s: 3.4.4
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: 王瑞环 Assignee: Kelsey Schubert
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot from 2018-12-26 10-40-25.png     PNG File Screenshot from 2018-12-26 10-41-05.png    
Issue Links:
Duplicate
duplicates SERVER-1475 {field: {$type:"array"}} should retur... Closed
Participants:

 Description   

When there is an array type of data in my collection, I can't query the data using {$type:"array"}.



 Comments   
Comment by Kelsey Schubert [ 26/Dec/18 ]

Hi wangruihuan,

Thanks for the report. This inconsistency was corrected in MongoDB 3.6 under SERVER-1475 and I'd recommend following Asya's workaround in MongoDB 3.4. Since this fix is a backwards breaking change it isn't suitable for backport. If you'd like to take advantage of the new semantics, I'd recommend upgrading to MongoDB 3.6 or later.

Kind regards,
Kelsey

Generated at Thu Feb 08 04:49:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.