Bug in whoosh.searching.ResultsPage

Issue #24 resolved
Paul Davis
created an issue

The math for calculating the total number of pages is off by one if the number of results is exactly divisible by the page length.

http://bitbucket.org/mchaput/whoosh/src/tip/src/whoosh/searching.py#cl-714

Should be something like:

{{{

!python

self.pagecount = self.total / pagelen if self.total % pagelen == 0: self.pagecount += 1 }}}

Comments (2)

  1. Log in to comment