Skip to content

fix: Open Library general q search so translated titles match#8

Merged
dhighwayman merged 1 commit into
masterfrom
fix/openlibrary-general-query
May 31, 2026
Merged

fix: Open Library general q search so translated titles match#8
dhighwayman merged 1 commit into
masterfrom
fix/openlibrary-general-query

Conversation

@dhighwayman

Copy link
Copy Markdown
Contributor

Problem

Searching "Policán 3" (the Spanish title of Dav Pilkey's Dog Man) returned no book, even though Open Library has it at /works/OL17798838W.

Our books provider queried title=, which only matches a work's primary (usually English) title — so the Spanish edition title never matched.

Fix

Switch the Open Library call from title= to the general q= parameter. q matches across all fields (incl. translated/edition titles) and still ranks title hits first.

Verified against the live Open Library API:

  • q=PolicánDog Man (the expected work) ✅
  • q=dune / q=harry potter → identical top results to before ✅

🤖 Generated with Claude Code

Books search used `title=`, which only matches a work's primary (usually
English) title — so "Policán 3" (the Spanish title of Dog Man) returned
nothing. Switch to the general `q=` parameter, which matches across all
fields incl. edition/translated titles and still ranks title hits first.
Verified identical quality for dune / harry potter and now finds Dog Man
for "Policán".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dhighwayman dhighwayman merged commit 59d99ac into master May 31, 2026
2 checks passed
@dhighwayman dhighwayman deleted the fix/openlibrary-general-query branch May 31, 2026 09:21
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