Skip to content

Instantly share code, notes, and snippets.

@Meekohi
Created December 7, 2013 05:37
Show Gist options
  • Select an option

  • Save Meekohi/7837659 to your computer and use it in GitHub Desktop.

Select an option

Save Meekohi/7837659 to your computer and use it in GitHub Desktop.
db.things.aggregate([
{'$project': {
tags:{$setIntersection:["$tags",["one","two","three"]}
}
}
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment