[SERVER-67427] [CQF] Conjunction with predicates over the same field does not match documents where the field is an array Created: 21/Jun/22  Updated: 27/Jul/22  Resolved: 27/Jul/22

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

Type: Bug Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Svilen Mihaylov (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-67771 Allow duplicate multi-key entries in ... Closed
Related
related to SERVER-67771 Allow duplicate multi-key entries in ... Closed
Sprint: QE 2022-07-11
Participants:

 Description   

Although it looks like a contradiction at a glance, the query

{$and: [{a: 1}, {a: 2}]}

Matches the document

{a: [1, 2]}

as each predicate is applied after implicitly traversing the leaf array. This query works on classic but does not return the matching document with Bonsai enabled.

The relevant test is here ($all is sugar for $and).


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