0
返回的錯誤是:
例外:手動匹配的配置不允許PyMongo:在條件二維地理空間索引組返回一個錯誤
這裏是我的代碼:
cond = {'id': id, 'date': {'$gte': start_date}, 'date': {'$lte': end_date}, 'location': {'$within': {'$box': box }}}
reduce = 'function(obj, prev) { prev.count++; }'
rows = collection.group({'location': True}, cond, {'count': 0}, reduce)
當我從條件中刪除位置那麼它工作正常。如果我將查詢更改爲find
,它也可以正常工作,所以它對組有問題。
我在做什麼錯?
謝謝!肯定會投它。 – 2010-10-22 10:42:50