I am trying to use __exact in my Haystack and SOLR4 backend app, but it does not work for SQ() as expected. I am wondering whether __exact just works for SearchQuerySet class. This is my code:
sqs = super(FacetedSearchForm, self).search()
author_sq = SQ()
title_sq = SQ()
author_sq.add(SQ(author__exact=sqs.query.clean(author)), SQ.OR)
title_sq.add(SQ(title__exact=sqs.query.clean(title)), SQ.OR)
sqs = sqs.filter(author_sq)
sqs = sqs.filter(title_sq)
Does anyone have any idea on how to get __exact work for SearchQuery class?
I'm using it like this:
sqs is a SearchQuerySet