Skip to content

Fix trending page expecting different doc shape #10912

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

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

cdrini
Copy link
Collaborator

@cdrini cdrini commented Jun 9, 2025

Addendum to #10882

Technical

I thought there was a reason I ended up using the get_docs method :P SearchResultItems I believe expected the return of this method. Updated it to handle both that and a direct dict from solr.

Testing

Tested author pages, trending pages, and search result pages; all SearchResultItem's now show up correctly

Screenshot

Stakeholders

@cdrini cdrini marked this pull request as ready for review June 9, 2025 15:09
@Copilot Copilot AI review requested due to automatic review settings June 9, 2025 15:09
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the trending page by correctly handling the different shapes of the "editions" document. The changes include:

  • Supporting both dictionary and list forms of the "editions" value.
  • Updating the logic to select the first edition only when the document type is 'solr_edition' and editions are present.

@cdrini
Copy link
Collaborator Author

cdrini commented Jun 9, 2025

Auto-merging, small addendum to #10882

@cdrini cdrini merged commit 6eeb77e into internetarchive:master Jun 9, 2025
4 checks passed
@cdrini cdrini deleted the hotfix/trending branch June 9, 2025 15:12
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.

1 participant