New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$box operator causes error, while query works fine on mongo shell #1122

Closed
rajesh-krishnan opened this Issue Mar 16, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@rajesh-krishnan

rajesh-krishnan commented Mar 16, 2018

Thank you for developing and maintaining Eve, a wonderful package.

A query such as: ?where={"user_location":{"$geoWithin":{"$box":[[-125.0,25.1],[-60.5,49.1]]}}}
over the REST API causes an error: Query contains unknown or unsupported operators: $box

The same query works fine in mongo shell. Is there a reason this operator is not supported?
Adding $box to the operators set in eve/io/mongo/mongo.py seems to fix the problem.

@nicolaiarocci

This comment has been minimized.

Member

nicolaiarocci commented Mar 16, 2018

Yes, looks like the box operator could be added without harm. Feel free to submit a PR for it, I'll gladly review it.

@nicolaiarocci nicolaiarocci added this to the 0.8 milestone Apr 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment