Closed mlissner closed 7 years ago
The SolrReponse object has a __len__ method that has very simple code right now:
__len__
def __len__(self): if self.groups: return len(getattr(self.groups, self.group_field)['groups']) else: return len(self.result.docs)
The third line of that I wrote, copying the code from the last line, but both are wrong. The updated code should be:
def __len__(self): if self.groups: return getattr(self.groups, self.group_field)['ngroups'] else: return self.result.numFound
This way things like paginators will be able to know the full size of the response.
Merged
The SolrReponse object has a
__len__
method that has very simple code right now:The third line of that I wrote, copying the code from the last line, but both are wrong. The updated code should be:
This way things like paginators will be able to know the full size of the response.