Created
July 14, 2012 22:11
-
-
Save danieltahara/3113662 to your computer and use it in GitHub Desktop.
Mongodb - Indexing Embedded Documents
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
Indexing on Embedded Fields("Dot Notation") | |
With MongoDB you can even index on a key inside of an embedded document. Reaching into sub-documents is referred to as Dot Notation. For example: | |
db.things.ensureIndex({"address.city": 1}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.mongodb.org/display/DOCS/Indexes#Indexes-Basics