Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return related materials ordered by query instead of covers #102

Conversation

kasperg
Copy link
Contributor

@kasperg kasperg commented Jul 8, 2020

In the current version we retrieve object ids from search result,
pass these to the cover service in the same order and merge material
data intro the provided results.

However practice has shown that the cover service does not
necessarily preserve the order of the requested ids in the response.
This leads to a situation where the related materials will not have
the same order as in the linked search result.

To preserve the order of the materials from the search result we
merge cover data into the materials instead and filter away any
materials without a cover.

In the current version we retrieve object ids from search result,
pass these to the cover service in the same order and merge material 
data intro the provided results.

However practice has shown that the cover service does not
necessarily preserve the order of the requested ids in the response.
This leads to a situation where the related materials will not have
the same order as in the linked search result. 

To preserve the order of the materials from the search result we 
merge cover data into the materials instead and filter away any 
materials without a cover.
@codecov
Copy link

codecov bot commented Jul 8, 2020

Codecov Report

Merging #102 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #102   +/-   ##
=======================================
  Coverage   81.20%   81.20%           
=======================================
  Files          47       47           
  Lines         649      649           
  Branches      152      152           
=======================================
  Hits          527      527           
  Misses        111      111           
  Partials       11       11           
Impacted Files Coverage Δ
...apps/related-materials/related-materials.entry.jsx 91.54% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0dc8bf...7ce2fae. Read the comment docs.

@kasperg kasperg merged commit 9f4f94b into danskernesdigitalebibliotek:master Jul 9, 2020
@kasperg kasperg deleted the related-materials-preserve-material-order branch July 9, 2020 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants