elasticsearch,django-rest-framework,django-haystack,drf-haystack,Django,elasticsearch,Django Rest Framework,Django Haystack,Drf Haystack" /> elasticsearch,django-rest-framework,django-haystack,drf-haystack,Django,elasticsearch,Django Rest Framework,Django Haystack,Drf Haystack" />

Django Haystack index_queryset筛选器在从管理面板更新对象时不工作

Django Haystack index_queryset筛选器在从管理面板更新对象时不工作,django,elasticsearch,django-rest-framework,django-haystack,drf-haystack,Django,elasticsearch,Django Rest Framework,Django Haystack,Drf Haystack,我正在用一些条件为一个模型建立索引。它很好用。但是,当我从管理面板更新一些信息时,条件不起作用 搜索索引: class QuestionBankIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True, template_name='search/question_bank_text.txt') question_id = ind

我正在用一些条件为一个模型建立索引。它很好用。但是,当我从管理面板更新一些信息时,条件不起作用

搜索索引:

class QuestionBankIndex(indexes.SearchIndex, indexes.Indexable):
    text = indexes.CharField(document=True, use_template=True, template_name='search/question_bank_text.txt')
    question_id = indexes.IntegerField(model_attr='id')
    owner = indexes.CharField(model_attr='owner', null=True)

    def get_model(self):
        return QuestionBank

    def index_queryset(self, using=None):
        return self.get_model().objects.filter(active=True)
所以,当我从管理面板更改一个对象时,这个对象正在索引,即使它是活动的=False
我正在使用Haystack==3.0和实时信号处理器配置