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
$in operator fails on array fields #18
Comments
Just acknowledging that I have seen this. I looked over the code and did some quick tests and it looks like I missed implementing the second part of $in functionality that you mention. That certainly needs to get fixed. What I could not do was reproduce your TypeError which is a little more concerning to me. Do you have any example documents that will cause that to trigger? Are you using memory or disk? |
Candidate patch to address $in/$nin behavior - https://github.com/scottrogowski/mongita/pull/21/files Would still be curious if you have a way to reproduce the TypeError |
@scottrogowski Sorry, my
|
Ah, you had me worried there. PyMongo throws an error when you use sets as well. The difference is that it's a bson.errors.InvalidDocument rather than a TypeError. So while I think I'll try to reproduce that exact error, I'm not as worried. Regardless, you helped me find something I had overlooked with the $in/$nin operators... so thank you. |
Yes sorry I didn't test the code with pymongo. I noticed that sets did work with the standard (non-array field) $in operator so I just extended the code to the array field version and saw the error. |
Addressed the $in/$nin with V1.1. I'll set aside document validation for sets for the moment in favor of a larger release later. |
According to https://docs.mongodb.com/manual/reference/operator/query/in/#mongodb-query-op.-in
mongita raises an error in this case:
The text was updated successfully, but these errors were encountered: