Skip to content

Commit

Permalink
use sorting by relvelance to avoid very large resource retrieval
Browse files Browse the repository at this point in the history
closes datacite/datacite#976

some requests retrieve very large resources together, we cannot filtered them in the query but sorting the resources differently (like in fabrica by relevance) helps.
  • Loading branch information
kjgarza committed Mar 2, 2020
1 parent 7776467 commit 605de58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_works(params = {})
'page[number]' => params.fetch('page[number]', 1),
'page[size]' => params.fetch('page[size]', 25),
ids: params.fetch(:ids, nil),
sort: params.fetch(:sort, nil),
sort: 'relevance',
query: params.fetch(:query, nil),
year: params.fetch('year', nil),
registered: params.fetch('registered', nil),
Expand Down

0 comments on commit 605de58

Please sign in to comment.