I apologize if this is a duplicate post. I tried to email this group
earlier today, but I think it failed because I wasn't a member yet.
Anyway, I have to questions about mongoengine. First, I'm using
mongoengine with django and I'm trying to return the results of some
queries in JSON format. Is there a standard way for serializing
mongoengine QuerySets as JSON? I found this post on the topic from
over a year ago, but I want to check and see if it is still the best
way.
http://groups.google.com/group/mongoengine-dev/browse_thread/thread/d740fe1fd8aa8a5f
Second, does mongoengine support specifying a maximum distance for
"near" queries? For example I want to do this query:
Place.objects(location__near=[lat, lng]).limit(20)
but I only want results within 1 degree of the specified location,
even if that is less than the limit of 20.
If that's not built in to mongoengine I'll just use the __raw__
option, but figured I would check first.
Thanks,
Andrew