Skip to content
Snippets Groups Projects
Commit 170709bb authored by Jared Hancock's avatar Jared Hancock Committed by Peter Rotich
Browse files

search: Add pagination support to advanced searches

This is pretty weak as implemented, but one of the problems with
searching speed is that, for each page render, the count of the hits is
required. But now the hits query does not actually collect the count for
the search queue. What's worse, the code collects counts for all saved
queues (not including the advanced search), so the counts are not
included. Then, the code re-collects the counts for all the queues since
the advanced search queue count isn't available. Then, since there still
is no count for the advanced search, it will show "0" results after
waiting to count all the other queues.

This cowardly fixes the issue by assuming there are 500 hits, which
allows a few pages. In reality, the pagination system should be rewired
so that it can dynamically add pages until it comes up with a short
read of results, in which case it can assume that it has reached the
end.
parent a9c283ec
No related branches found
No related tags found
No related merge requests found
......@@ -956,6 +956,10 @@ class SavedSearch extends SavedQueue {
function isSaved() {
return (!$this->__new__);
}
function getCount($agent, $cached=true) {
return 500;
}
}
class AdhocSearch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment