Free tools Windows power users keep installed
One-click scans. No signup required.
Use Searcher.search_page(query, pagenum, pagelen=...) for fixed-size pages, then build the range and page label from the returned ResultsPage. Whoosh page numbers start at 1; offsets start at 0. Keeping those conventions separate prevents off-by-one errors and avoids mistaking the current page’s hits for the total matches.
Paginate fixed-size results with search_page
Whoosh’s Searcher.search_page(query, pagenum, pagelen=...) returns a ResultsPage that can be iterated like a result set and also exposes metadata for the requested page. The page number is one-based, and the default page length is 10. Set pagelen explicitly when your interface uses a different fixed page size.
As an Amazon Associate I earn from qualifying purchases.
page_number = 3
page_size = 10
page = searcher.search_page(query, page_number, pagelen=page_size)
start = page.offset + 1
end = page.offset + page.pagelen
label = f"Page {page.pagenum} of {page.pagecount}"
range_label = f"Showing {start}–{end} of {page.total}"
for hit in page:
print(hit)
This example follows the API’s one-based page convention and uses the returned metadata for the displayed values. See the Whoosh 2.7.4 searching API reference.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
What the page metadata means
| Field | Meaning | Use in the interface |
|---|---|---|
pagenum |
The current, one-based page number. | Display as the current page. |
pagecount |
The number of pages available for the query at the requested page length. | Display as the total page count. |
offset |
The zero-based index of the first result on this page. | Add 1 for the first displayed result number. |
pagelen |
The number of hits actually present on this page; the final page may be shorter than the requested page length. | Calculate the displayed end from the actual page length. |
total |
The total number of matching hits. | Display as the total matches, not as the current page’s hit count. |
For a page beginning at offset 20 with 10 hits, the displayed range is 21–30. If the final page begins at offset 20 but contains only 4 hits, display 21–24—not 21–30. The formulas are start = page.offset + 1 and end = page.offset + page.pagelen.
#1 Best Overall
Validate the page parameter at the application boundary
Parse a page value from the query string as an integer and validate it before calling Whoosh. Since page numbers begin at 1, a user-facing page parameter should not be treated as a zero-based offset. The API reference says that requesting a page beyond the available count may return the last available page, with pagenum adjusted accordingly. If your application depends on how zero or negative values behave, verify that behavior against the installed Whoosh release rather than assuming it.
Use search_range for arbitrary offsets
search_page fits page-number navigation where each page starts at a multiple of a fixed page length. If your interface instead requests an arbitrary start and end—for example, a window that begins at result 7—use search_range(query, start, end) when supported by your installed version. Converting an unaligned start offset into a page number can shift the window and cause rows to be skipped or repeated. The Whoosh search guide describes this distinction.
Rank #2
Keep result windows bounded
The standard search() method returns at most the first 10 results by default. Specify an appropriate limit when retrieving a larger window, and avoid requesting an unbounded result set if the interface only needs one page. Pagination does not make deep pages free: the Whoosh guide illustrates that page 100 at 10 results per page takes work comparable to finding the first 1,000 results. That is a documentation example, not an independent benchmark. Keep page lengths bounded and consider limiting how deep users can navigate.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsCheck the installed Whoosh version
The API reference is for Whoosh 2.7.4, while the search guide is hosted separately. Confirm the distribution and version used by your application before relying on search_range or details that may vary between releases. The project’s searching documentation is another reference for result retrieval behavior.
Quick Recap
Best Value
Rank #4
- Used Book in Good Condition
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




