Asset search: order by newest-first on empty query
This commit is contained in:
parent
9d39995d0f
commit
284d822a8a
@ -77,6 +77,8 @@ def do_node_search(query: str, terms: dict) -> dict:
|
|||||||
should = []
|
should = []
|
||||||
|
|
||||||
search = nested_bool(must, should, terms, index_alias='NODE')
|
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)
|
add_aggs_to_search(search, NODE_AGG_TERMS)
|
||||||
|
|
||||||
if log.isEnabledFor(logging.DEBUG):
|
if log.isEnabledFor(logging.DEBUG):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user