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

I'm really getting tired of providing hacks for Whoosh. Meh.

What are your aesthetic thoughts on this version:

```
if empty_value is None:
kwargs = {'%s__isnull' % field: True}
else:
kwargs = {'%s__exact' % field: empty_value}

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}
```

The thing that's bothering me about the way it is now is that it makes it look like there's different behavior when there's a SearchQuerySet involved, when in fact the aberrant behavior is only present when Whoosh is being used.

I am also still concerned about the fact that we're treating a ``__contains`` query as identical to an ``__exact`` query; however, in the absence of a test case proving that this is an issue that we'll actually run into, I would be okay with this going through.