Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"x":[1,2],"y":[1,2,3]},{"x":[1,2],"y":[2,3,4]}]
Query
db.collection.aggregate([{$match:{$expr:{"$setIsSubset":["$x","$y"]}}}])
Result