Skip to content
Snippets Groups Projects
  • Jared Hancock's avatar
    170709bb
    search: Add pagination support to advanced searches · 170709bb
    Jared Hancock authored
    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.
    170709bb
    History
    search: Add pagination support to advanced searches
    Jared Hancock authored
    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.