Fix and improve searching for review requests.
Review Request #7057 — Created March 13, 2015 and submitted
Our Haystack-based search, while easy to install, left much to be desired. This change attempts to improve the overall experience of searching for review requests in several ways. First, the ordering of review requests are no longer left up to the backend, as a relevance search isn't really that useful to our users. Instead, we force the results to be ordered by the last updated timestamp. The review request IDs are now based on the display ID, instead of the database ID, which will be necessary when we support Local Sites. To improve performance, I've removed the load_all() call and the old configurable limit we used to have for the maximum number of review requests. I then added some fields we wanted to display in the results, and updated the template to no longer access the database for these objects, using the indexed data instead. The paginator now has links for jumping to the very first and last page (when there's a large number of pages), and for jumping to any page within a given range. The logic for this was taken from the datagrid code. To complete the experience, I've made a few tweaks to the stylesheets, massively improving the look of the search results.
Tested searching for various review requests with different pagination
results. Always saw the results sorted such that the most recently updated
review requests were first.Tested editing the search settings, to ensure the form changes didn't break
anything.Everything was tested with a fresh index.