This project has moved. For the latest updates, please go here.

Geospatial indexing?

Jul 16, 2012 at 3:50 PM

Hi guys,

I am migrating from the (dead) NoRM Framework and trying your MongoRepository, I wonder if somehow I can make it work with GeoSpatial indexing? In NoRM I had to heavily hack it to make it work.

Thanks.

Jul 17, 2012 at 1:29 AM

I noticed there are some Geo method on the obsolete Collection class, like GeoNear among others. I was actually looking for some method that would run Within commands.

Coordinator
Jul 17, 2012 at 5:31 PM
Edited Jul 17, 2012 at 5:35 PM

MongoRepository is a (generic) Repository abstraction; specific details like geospatial indexing do not belong in such an abstraction. I'm afraid you'd be better off just using the 10gen driver directly or wrapping the geospatial functionality internally in a derived repository using the (indeed obsoleted) Collection property. For the latter option you might want to fork a project to simply remove the obsolete attribute; for MongoRepository I am, for now, a little hesitant to actually remove the .Collection property but I'm pretty sure it will be removed eventually (hence the obsolete attribute).

I don't see how, and don't know if, but there might be, eventually, some LINQ support for geospatial indexing. In that case the functionality will automatically be exposed via MongoRepository's (e.g. 10gen's) LINQ interface.