Fix http://www.redmine.org/issues/16239

Remove the limit on the search so that the sort to display pages is done
on the entire search not on a subset of the search.