While using django.core.paginator import ObjectPaginator, I'm getting this error:
NeedIndexError: The built-in indices are not efficient enough for this query and your data. Please add a composite index for this query.
The original query is written in this form:
query = models.Cdr.all()
query.filter("var1 =", var1 )
query.filter("var2 =", var2)
query.filter("var3 =", var3)
I get this exception when ObjectPaginator tries to count the number of elements, but only for some values of var1.
Why would this query fail for some values of var1, while working with others?
What would you recommend for this case?