mongodb
Ruby MongoDB Geospatial Indexing Sample Codes
MongoDB has a geospatial indexing feature that allows nearby search. I was trying to get some sample codes running. But the example codes doesn't work as 'ensureIndex' doesn't seem to exist. The Ruby sample codes don't work either as db.create_index's parameters seem to have changed.
Peeking into the geospatial index test codes on the create_index method, it turned out that the first argument for create_index must be array of array for geospatial index(check out the documentation for the create_index method).











