diff --git a/ietf/doc/views_search.py b/ietf/doc/views_search.py index 1f8cb7024..ccfbd136b 100644 --- a/ietf/doc/views_search.py +++ b/ietf/doc/views_search.py @@ -137,7 +137,9 @@ def retrieve_search_results(form, all_types=False): query = form.cleaned_data if all_types: - docs = Document.objects.all() + # order by time here to retain the most recent documents in case we + # find too many and have to chop the results list + docs = Document.objects.all().order_by('-time') else: types = []