Not working faceted search check box, whoosh + haystack?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
41 views
Good afternoon. Did a bunch of whoosh+haystack, not working faceted search check box.
In the file search_indexes.py prescribed:
from haystack import indexes from product.models import Blog class BlogIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.EdgeNgramField(document=True, use_template=True, template_name='search/indexes/blog/blog_text.txt') title = indexes.CharField(model_attr='title', faceted=True) author= indexes.CharField(model_attr='author', faceted=True) def get_model(self): return Blog def index_queryset(self, using=None): return self.get_model().objects.all()

after doing the update of the index and in the console enter:
>>> from haystack.query import SearchQuerySet >>> sqs = SearchQuerySet().facet('author') >>> sqs.facet_counts() {}

And pycharm'e issues here is the "Warning: Whoosh does not handle faceting.
return func(obj, query_string, *args, **kwargs)"
Thank you.
by | 41 views

1 Answer

0 like 0 dislike
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Mar 26, 2019 by Dark_Knight
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
28,052 users