toastdriven/django-haystack — Issue #447: SearchQuerySet does not support filtering on multiple fields with field lookups for Whoosh backend
Author: jacksonqt
Created: 2011-11-19 01:31:08+00:00
State: open

>>> sqs = SearchQuerySet()
>>> sqs.filter(width__gte=6)
[]
>>> sqs.filter(height__gte=6)
[]
>>> sqs.filter(width__gte=6, height__gte=6)
[]
>>> sqs.filter(width__gte=6) & sqs.filter(height__gte=6)
[]
# The last two operations should return the same result as the first two.

Partial workaround:

Use sets and unions to chain filters. However this requires __eq__, __ne__ and __hash__ to be implemented in the SearchResult object. It also has many limitations and inconveniences.