alonho/pql

Bug on $near query

mesarvagya opened this issue · 1 comments

There is an error while creating query for GeoQueries, especially near. Your example location == near([1, 2], 10) generates {'location': SON([('$near', [1, 2]), ('$maxDistance', 10)])}, where SON([( is some random characters (possibly missing { and } ). It is replicated for location == near(Point(1, 2), 10) and location == nearSphere(Point(1, 2)) . Thanks.

It's not a bug. SON([('a', 1), ('b', 2)]) is actually an ordered dictionary implemented by pymongo (python's dictionary is unordered).