Skip to content

Commit

Permalink
Sort ranking in descending order
Browse files Browse the repository at this point in the history
  • Loading branch information
Br3nda committed Feb 22, 2019
1 parent 93ac068 commit 42809f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckanext/datastore/backend/postgres.py
Expand Up @@ -471,7 +471,10 @@ def _sort(sort, fields_types, rank_columns):
to order by best text search match
'''
if not sort:
return rank_columns.values()
rank_sorting = []
for column in rank_columns.values():
rank_sorting.append(u'{0} DESC'.format(column))
return rank_sorting

clauses = datastore_helpers.get_list(sort, False)

Expand Down

0 comments on commit 42809f7

Please sign in to comment.