I'm getting "None" for spelling suggestions.
First, I have this set in my settings.py file:
HAYSTACK_INCLUDE_SPELLING = True
I have rebuilt the index:
python manage.py rebuild_index
and updated it for good measure
python manage.py update_index
The search works correctly. When I search for "Charger", it returns the results that match. So in my views.py, I then tried:
from haystack.query import SearchQuerySet
def testpage(request):
test_results = SearchQuerySet().auto_query('Chargr')
spelling_suggestion = test_results.spelling_suggestion()
return render_to_response('testpage.html', {
'test': test_results,
'spelling_suggestion': spelling_suggestion
})
However, my template:
<html>
<body>
{{ test }}<p>
{{ spelling_suggestion }}
</body>
</html>
Still returns nothing:
[]
None
Obviously, I expected nothing for {{ test }}, but shouldn't I get something for {{ spelling_suggestion }}? What am I missing?