我堆疊建立在C#中的驅動程序這個MongoDB的查詢:MongoDB的:建立在C#中的驅動程序查詢
{
Location: { "$within": { "$center": [ [1, 1], 5 ] } },
Properties: {
$all: [
{ $elemMatch: { Type: 1, Value: "a" } },
{ $elemMatch: { Type: 2, Value: "b" } }
]
}
}
東西未來:
var geoQuery = Query.WithinCircle("Location", x, y, radius);
var propertiesQuery = **?**;
var query = Query.And(geoQuery, propertiesQuery);
增加:
上面的查詢從我的另一個問題採取: MongoDB: Match multiple array elements 歡迎您帶標準在其解決方案中。
查詢與$和不是100%相當於原來的。詳情請查看我問題底部的鏈接。無論如何感謝您的回答。 – Kamarey 2013-03-17 19:19:18