Geospacial indexes

27 views
Skip to first unread message

Daniel Grippi

unread,
Aug 13, 2011, 7:57:22 PM8/13/11
to mongo...@googlegroups.com
Hey all,

I'm in the midst of creating a node app with mongoosejs and one of my requirements is to utilize mongo's geospacial indexing (http://www.mongodb.org/display/DOCS/Geospatial+Indexing).  I've been perusing the docs on the mongoosejs site (namely http://mongoosejs.com/docs/indexes.html), and haven't found any reference to setting an index type other than `unique`.  Is there a way to declare a geospacial index when defining a model schema?

Thanks in advance!
d

Daniel Grippi

unread,
Aug 13, 2011, 11:13:12 PM8/13/11
to mongo...@googlegroups.com
nevermind, it seems that passing in "2d" instead of "unique" does the trick.  i just had to look at the source again.  *facepalm*

d
Reply all
Reply to author
Forward
0 new messages