benjolras / solrpy

Automatically exported from code.google.com/p/solrpy
0 stars 0 forks source link

Paginator fails on last page #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If you are using the paginator (trunk) and try to access the last page, the
num_pages property and therefore the page_range property fail because the
page length calculation is dependent upon the length of the result list on
the current page.

It would be better if the rows parameter was always returned in the header,
but since this isn't a perfect world, I propose looking for that first. If
the rows parameter isn't present, fall back to a 'default_page_size' or
'default_rows' argument that can be passed to the paginator factory.
Lastly, if that argument is not provided, use the length of the current
results.

Original issue reported on code.google.com by benliles on 12 May 2009 at 3:08

GoogleCodeExporter commented 8 years ago
Fixed in trunk revision #38

Original comment by benliles on 12 May 2009 at 8:08