MongoError reports no indices when passed indices through URL using geoNear
问题 Im trying to create a page that lists locations on a database by their distance from me. When I pass in a set of coordinates via the URL I get this error: { "name": "MongoError", "message": "no geo indices for geoNear", "waitedMS": 0, "ok": 0, "errmsg": "no geo indices for geoNear" } from typing in: http://localhost:3000/api/locations?lng=-133.482946&lat=45.263776 my code is as follows: module.exports.locationsListByDistance = function (req, res) { var lng = parseFloat(req.query.lng); var lat