Search Results Paging Short by 1 Page

Jul 17, 2013 at 8:50 PM
Edited Jul 17, 2013 at 8:50 PM
Hi Rigardt,

I noticed something strange - the display on the footer of the search results page could be something like this:
< Previous 1 Next >
Showing 1-20 of 39 results. Search completed in 0.013 seconds.

Notice that there should be a link for a second page - "2" to show results 21-39.

I was able to fix it on line 191 of 'Search_Results.cshtml' with the following change:
var numPages = (int)resultsItem.Current.Evaluate("number(/results/summary/@numPages)")+1;
but this seems to be more of a band-aid, since I'd assume that the Evaluate function ought to be returning the correct number of pages.
Jul 22, 2013 at 9:25 AM
Hi Heather

Thanks for this. I'll take a look and make sure the correct value is returned for numPages.

Governor Technology
Jul 23, 2013 at 4:57 PM
Hi Heather

We've released a new version which now has he correct value for numPages. Please refer to your appropriate version used: 4.7.1 / 4.8.1 / 6.0.1. It contains a minor update in the DLL as well as in FullTextSearch.cshtml.

Thanks for reporting on the issue!

Best regards,
Governor Technology
Jul 23, 2013 at 9:03 PM
Fantastic - Thanks!
Jul 24, 2013 at 9:28 AM
If you want to apply the FullTextSearch.cshtml changes manually, below are the new lines:

line 262: remove "-1") @for (var curPage = startPage; curPage <= numPages && curPage < startPage + numNumbers; curPage++)

line 276: remove "-1") @if (pageNumber < numPages)
Jul 24, 2013 at 6:15 PM
Edited Jul 24, 2013 at 6:19 PM
Got it, thanks!

Yes, it's fixed :-)