Mongodb c#无法解析/ geoquery附近

时间:2014-04-24 09:14:03

标签: c# mongodb mongodb-.net-driver mongodb-query

尝试解析此查询时

Query.Near("coordinates", 58, 8, 100000));

在c#中,我收到了他的错误消息:

Command 'count' failed: exception: can't parse query (2dsphere): 
{ $near: [ 58.1453,     7.9571 ], $maxDistance: 100000.0 } 
(response: { "errmsg" : "exception: can't parse query   
(2dsphere): { $near: [ 58.1453, 7.9571 ], $maxDistance: 100000.0 }",
"code" : 16535, "ok" : 0.0 })

如果我尝试解析shell中的以下查询

db.docs.find({coordinates : { $near : { type : "Point" , coordinates : [ 58, 8 ] },   
$maxDistance : 100 } }  )

它被解析了。所以我想知道的是如何在C#中构建工作查询?

提前致谢。

0 个答案:

没有答案