mraible opened a new pull request, #249: URL: https://github.com/apache/roller/pull/249
On a 7.0.0 snapshot, searching my site for "java" said "10 entries found" and offered no next page. On 5.0.3 the same search reports 1,858 and pages through them. `SearchResultsModel` set `hits = searchResultList.getResults().size()`, which is the number of results on the current page. So the count never went above ten, and the pager's "more results" test, `hits > offset + limit`, could never be true. What this changes: - `SearchResultList` carries two more things: the total number of matches, and whether there are results after this page. `SearchResultsModel` uses those for `$model.hits` and the pager. - `SearchOperation` asked Lucene for the first 500 matches. It now asks for all of them, so the total is exact and results past 500 can be reached. - To know whether a next page exists, the page conversion loads one visible entry beyond the page. The three tests that count entry loads are updated for that, and there are new assertions for the total and for the last page. I built the WAR and ran it against a copy of my site: "java" reports 1,017 matches, page 100 holds the last one with only a Previous link, and pages in between have both links. One thing I left alone: a page number past the end still falls back to the first page, as before. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
