Closed agateblue closed 8 years ago
You may find something interesting at Python Dee perhaps.
Thanks for the link, I never heard about it but there are sure interesting ideas in there.
Regarding this specific issue, though, this is something I'm working on by compiling queries together, before running them against the dataset. You can see the feature/backend branch for more details.
Cool. I thought it could be something to be done using sets' intersection. I will follow along on the branch. Maybe add the reference link to the solution you are trying then.
You're right, I've opened a regular PR to show the branch state, please refer to #34 for more details.
The current pattern when chaining filters do not merge queries together:
When evaluating the queryset, it will loop over available values, return the one that match query1, then loop other these remaining values and exclude the one that match query2.
It would be more efficient to loop only once on all values, and return only values that match all queries.