Turn on mongo sorting using disk usage by default for sorting in *.get_all* apis

This commit is contained in:
allegroai 2023-03-23 19:12:52 +02:00
parent dd49ba180a
commit 24bb87aaee
2 changed files with 3 additions and 3 deletions

View File

@ -4,6 +4,6 @@ max_page_size: 500
scroll_state_expiration_seconds: 600
allow_disk_use {
# sort: true
sort: true
aggregate: true
}

View File

@ -934,7 +934,7 @@ class GetMixin(PropsMixin):
qs = qs.search_text(search_text)
if order_by:
# add ordering
qs = qs.order_by(*order_by)
qs = cls._get_qs_with_ordering(qs, order_by)
if include:
# add projection
@ -1026,7 +1026,7 @@ class GetMixin(PropsMixin):
res = cls._get_queries_for_order_field(query, order_field)
if res:
query_sets = [cls.objects(q) for q in res]
query_sets = [qs.order_by(*order_by) for qs in query_sets]
query_sets = [cls._get_qs_with_ordering(qs, order_by) for qs in query_sets]
if order_field and not override_collation:
override_collation = cls._get_collation_override(order_field)