Asset search: order by newest-first on empty query

This commit is contained in:
Sybren A. Stüvel 2018-01-05 17:29:59 +01:00
parent 9d39995d0f
commit 284d822a8a

View File

@ -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):