diff --git a/ietf/doc/views_search.py b/ietf/doc/views_search.py index 4232d77f6c..5d59adb349 100644 --- a/ietf/doc/views_search.py +++ b/ietf/doc/views_search.py @@ -260,6 +260,10 @@ def retrieve_search_results(form, all_types=False): docs=docs.distinct() + # order by time here to retain the most recent documents in case we + # find too many and have to chop the results list in prepare_document_table + docs = docs.order_by('-time') + return docs