3
맞춤법 추천을 위해 "없음"이 표시됩니다. 나는 인덱스 다시 한django-haystack 및 Solr의 맞춤법 추천
HAYSTACK_INCLUDE_SPELLING = True
:
첫째, 내 settings.py 파일이 세트가 좋은 측정을 위해 그것을
python manage.py rebuild_index
을 업데이트를
python manage.py update_index
검색이 올바르게 작동합니다. "충전기"를 검색하면 일치하는 결과가 표시됩니다. 그래서 내 views.py에, 나는 다음 시도 :
그러나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
})
, 내 템플릿 :
[]
None
을 분명히, 내가 {{테스트를 위해 아무것도를 예상 :
<html>
<body>
{{ test }}<p>
{{ spelling_suggestion }}
</body>
</html>
은 아직 아무것도 반환 }},하지만 {{spelling_suggestion}}에 대해 뭔가를 얻을 수는 없습니까? 내가 뭘 놓치고 있니?