class MySearchView(FacetedSearchView):
form_class = MySearchForm
facet_fields = ['category', 'color', 'size']
template_name = 'products/search_result.html'
paginate_by = 3
context_object_name = 'object_list'
def get_queryset(self):
qs = super(MySearchView, self).get_queryset()
for field in self.facet_fields:
qs = qs.facet(field, min_doc_count=0)
return qs