|
Hi grmblfrz,
Thank you for the feature request, but I believe this functionality is already possibly by re-writing the query to something like the following:
> db.t.find({$or: [{c1: "option 1", c2: 1}, {c1: "option 2", c2: 2}, {c1: "option 3", c2: 3}]})
|
Alternatively, now that we have resolved SERVER-6146 which added an $in expression to the aggregation framework, you could express it more succinctly in this way:
> db.t.aggregate([{$addFields: {containsTuple: {$in: [["$c1", "$c2"], [["option 1", 1], ["option 2", 2], ["option 3", 3]]}}}}, {$match: {containsTuple: true}}])
|
Please note that using the aggregation framework in this way may impact performance, as we likely will not find relevant indices for that query.
Given that there are two workarounds, and it's unclear what the syntax would look like, I am closing this ticket as "Won't Fix". Please feel free to re-open if you have a proposal for better syntax, and we will reconsider.
|