X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/ef3a7be179d7fb38030ef5a2760b17e42d25320b..940b12d0c2d04c80f8479fa95b37c0badd42869d:/questions/search_indexes.py?ds=inline diff --git a/questions/search_indexes.py b/questions/search_indexes.py index ff49250..e2e05f8 100755 --- a/questions/search_indexes.py +++ b/questions/search_indexes.py @@ -4,7 +4,7 @@ from haystack import indexes from .models import Question -class QuestionIndex(indexes.RealTimeSearchIndex, indexes.Indexable): +class QuestionIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True) answer = indexes.CharField(model_attr="answer") @@ -14,6 +14,6 @@ class QuestionIndex(indexes.RealTimeSearchIndex, indexes.Indexable): def get_model(self): return Question - def index_queryset(self): + def index_queryset(self, using=None): """Used when the entire index for model is updated.""" return self.get_model().objects.filter(published=True)