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

Already on GitHub? Sign in to your account

Fix for issue 613 including test cases; combining complex queries was totally broken #617

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants

mjl commented Jul 24, 2012

Combining non-trivial queries, for example

<SQ: AND (content__contains=foo AND content__contains=bar)> | <SQ: AND (content__contains=bar AND author__contains=johnny)>

would give

<SQ: AND (((content__contains=foo AND content__contains=bar) OR content__contains=bar) AND author__contains=johnny)>

which clearly is wrong. This commit fixes that and adds test cases for the problem.

acdha added a commit to acdha/django-haystack that referenced this pull request Nov 25, 2012

Fix combination logic for complex queries
Previously combining querysets which used a mix of logical AND and OR operations
behaved unexpectedly.

Thanks to @mjl for the patch and tests in SHA: 9192dbd

Closes #613, #617

floppya added a commit to floppya/django-haystack that referenced this pull request Mar 29, 2013

Fix combination logic for complex queries
Previously combining querysets which used a mix of logical AND and OR operations
behaved unexpectedly.

Thanks to @mjl for the patch and tests in SHA: 9192dbd

Closes #613, #617

@bigjust bigjust closed this Jul 29, 2013

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