diff --git a/openlobby/core/search.py b/openlobby/core/search.py index 56277ed2ac4abdfcd76ef5241080552403da0d50..c72d581d71080093518dd1337500628f367216f4 100644 --- a/openlobby/core/search.py +++ b/openlobby/core/search.py @@ -24,7 +24,7 @@ def query_reports(query, paginator, *, highlight=False): s = s.query("multi_match", query=query, fields=fields) if highlight: s = s.highlight(*fields, **HIGHLIGHT_PARAMS) - s = s.sort("-date") + s = s.sort("-published") s = s[paginator.slice_from : paginator.slice_to] return s.execute() @@ -34,6 +34,6 @@ def reports_by_author(author_id, paginator): s = s.exclude("term", is_draft=True) s = s.exclude("exists", field="superseded_by_id") s = s.filter("term", author_id=author_id) - s = s.sort("-date") + s = s.sort("-published") s = s[paginator.slice_from : paginator.slice_to] return s.execute()