-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation pipeline
-
None
-
Iteration Giraffe, Iteration Hedgehog
-
None
-
None
The first stage in this example is incorrectly rejected:
{
from: "air_airlines",
let: { maybe_name: "$airlines" },
pipeline: [
{
$match: {
$expr: {
$gt: [
{
$size: {
$setIntersection: [
"$$maybe_name",
["$name", "$alias", "$iata", "$icao"]
]
}
},
0
]
}
}
},
{
$project: {
_id: 0,
name_is: "$name",
ref_name: {
$arrayElemAt: [
{
$filter: {
input: "$$maybe_name",
cond: {
$in: ["$$this", ["$name", "$alias", "$iata", "$icao"]]
}
}
},
0
]
}
}
}
],
as: "found"
}