Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save dalmat36/79849c90ecb859940ade to your computer and use it in GitHub Desktop.

Select an option

Save dalmat36/79849c90ecb859940ade to your computer and use it in GitHub Desktop.
Webinar: Introduction to using MongoDB and Spring Data on Cloud Foundry
//find posts with any tags
db.posts.find({tags:{$exists:true}}).pretty()
//find posts matching a regular expression
db.posts.find({author:/^rog*/i}).pretty()
//count posts by author
db.posts.find({author: 'roger'}).count()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment