Created
May 6, 2015 14:55
-
-
Save dalmat36/79849c90ecb859940ade to your computer and use it in GitHub Desktop.
Webinar: Introduction to using MongoDB and Spring Data on Cloud Foundry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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