Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
d6c66bf6
Commit
d6c66bf6
authored
Jul 23, 2019
by
Markus Scheidgen
Browse files
Use the right elastic properties for ordering. Fixes
#142
parent
141954c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
nomad/search.py
View file @
d6c66bf6
...
...
@@ -279,6 +279,8 @@ def _execute_paginated_search(
if
order_by
not
in
search_quantities
:
raise
KeyError
(
'Unknown order quantity %s'
%
order_by
)
_
,
order_by
,
_
=
search_quantities
[
order_by
]
search
=
search
.
sort
(
order_by
if
order
==
1
else
'-%s'
%
order_by
)
paginated_search
=
search
[(
page
-
1
)
*
per_page
:
page
*
per_page
]
response
=
paginated_search
.
execute
()
# pylint: disable=E1101
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment