Created
July 7, 2011 21:39
-
-
Save JakubOboza/1070609 to your computer and use it in GitHub Desktop.
Mongodb Geospital Index
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
/* Adding index */ | |
db.places.ensureIndex( { loc : "2d" } ) |
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
/* How location array can look like */ | |
{ loc : [ 50 , 30 ] } | |
{ loc : { x : 50 , y : 30 } } | |
{ loc : { foo : 50 , y : 30 } } | |
{ loc : { long : 40.739037, lat: 73.992964 } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment