pculture/mirocommunity — comment on commit f6005919f7d042e813d6fe787ba823159dabdc5d
File:  line 0
By melinath:

This does fix the bug, but now there's repeated code; what about:

```
if empty_value is None:
kwargs = {'%s__isnull' % field: True}
else:
if (isinstance(queryset, SearchQuerySet) and
'WhooshEngine' in
connections[queryset.query._using].options['ENGINE']):
# HACK __exact queries don't work on Whoosh:
# https://github.com/toastdriven/django-haystack/issues/529
kwargs = {field: empty_value}
else:
kwargs = {'%s__exact' % field: empty_value}
```

After some thought, I'm actually not sure we should be fixing this at all - the reason it's being forced to an exact query is that the default (__contains) gives incorrect results - might even error in some cases; don't remember any more, and I didn't mention it in the commit message. If it's causing problems for local testing, have you tried using elasticsearch locally?