Created
February 15, 2012 12:49
-
-
Save slideep/1835451 to your computer and use it in GitHub Desktop.
An example using MongoDB query with $nin conditional
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
| db.airports.find({ "iso_country" : "FI", "type" : { "$nin" : ["heliport", "small_airport"] } }).limit(100).sort({ "name" : 1 }) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Of course you wouldn't use this for pagination (skip and then limit next set). You'll have to use a different approach for the criteria.