Edit: More info at bottom of post...
Original Question:
I seem to be having the same problem as in this (unresolved) question: django-haysta
It looks like this a bug in haystack that has already been reported but has yet to be addressed:
https://github.com/django-haystack/django-haystack/issues/1021
Unfortunately if the "text" index field is Ngram or EdgeNgram SearchQuerySet().count()
and SearchQuerySet().all().count()
will return 0
unless you specify a filter, e.g. SearchQuerySet().all().exclude(content='thisshouldnotmatchanythingintheindex').count()
returns the total number of indexed objects.