Skip to content

Conversation

@mekarpeles
Copy link
Member

Closes #11206

Technical

Testing

Screenshot

Stakeholders

@Copilot Copilot AI review requested due to automatic review settings August 31, 2025 07:04
Copy link
Contributor

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 switches from individual metadata fetches to bulk Solr queries for ebook availability information. Instead of making individual calls to Internet Archive's metadata API for each book's availability status, the implementation now fetches ebook access information for all books in a single Solr query.

Key changes:

  • Replaces individual get_ia_availability() calls with bulk Solr query in add_availability()
  • Removes the get_ia_availability() function that made individual IA metadata calls
  • Updates the processing pipeline to use the new bulk availability fetching approach

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mekarpeles mekarpeles force-pushed the refactor/api-books-availability branch 4 times, most recently from 318b182 to e1ef793 Compare September 1, 2025 04:08
@mekarpeles mekarpeles force-pushed the refactor/api-books-availability branch from f3197e1 to b525402 Compare September 1, 2025 04:23
@mekarpeles mekarpeles added the Priority: 1 Do this week, receiving emails, time sensitive, . [managed] label Sep 8, 2025
`preview` is now required in certain contexts. To make that context
clear, I added type hints to most of dynlinks to make sure it's only
being added when it aught be.

Also switch from Solr.select to Solr.get_many ; that's in theory a bit
more performant.
The key in the dictionary is NOT an open library key, but a "bibkey" eg
`OCAID:goody`
@mekarpeles mekarpeles merged commit fcfe717 into master Sep 11, 2025
8 checks passed
@cdrini cdrini deleted the refactor/api-books-availability branch September 11, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: 1 Do this week, receiving emails, time sensitive, . [managed]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants