2dsphere

    1熱度

    2回答

    一個2dsphere指數我試圖通過C#驅動做某事這樣 db.points.ensureIndex({ <location field> : "2dsphere" }) http://docs.mongodb.org/manual/core/2dsphere/ 。但API貌似只有把「鑰匙」作爲參數,沒有辦法指定類型 http://api.mongodb.org/csharp/current/ht

    0熱度

    1回答

    我有一個簡單的問題,我想在我的Node.js服務器查詢之後返回MongoDB的文檔: var coords = []; coords[0] = req.query.valArray.lng; // client latitude coords[1] = req.query.valArray.lat; // client longitude var distanc

    4熱度

    1回答

    我試圖通過使用MongoDB的find方法查詢某個點周圍的緯度和經度點來使用MongoDB的地理空間索引。我不斷收到錯誤: MongoError: can't find any special indices: 2d (needs index), 2dsphere (needs index) 我不知道在哪裏的文檔谷歌搜索了大約一個小時後,就是這個。我也找不到任何好的解釋。下面是我用貓鼬創建的模式:

    0熱度

    1回答

    我有一次收集樣本: var testSchema = new Schema({ title: {type: String, required: true}, owner: {type:Schema.Types.ObjectId}, locatedAt: {type: {}, index: '2dsphere', sparse: true, "2dsphereIndexVersion

    0熱度

    1回答

    我YiiMongoDbSuite 1.3.6 $users = MyModel::model()->findAll(array( 'conditions'=>array( 'loc'=>array( 'near' => array(50,50), 'maxDistance' => 1/111.12,