diff --git a/pillar/api/search/queries.py b/pillar/api/search/queries.py index 52d6209f..09f16947 100644 --- a/pillar/api/search/queries.py +++ b/pillar/api/search/queries.py @@ -77,6 +77,8 @@ def do_node_search(query: str, terms: dict) -> dict: should = [] search = nested_bool(must, should, terms, index_alias='NODE') + if not query: + search = search.sort('-created_at') add_aggs_to_search(search, NODE_AGG_TERMS) if log.isEnabledFor(logging.DEBUG):