diff --git a/internal/search/service.go b/internal/search/service.go index 36e7247..1eaaa4b 100644 --- a/internal/search/service.go +++ b/internal/search/service.go @@ -63,7 +63,10 @@ func getJSON(reqURL string, out interface{}) error { // --- Books: Open Library (keyless) --- func (serv *Service) searchBooks(query string) []Result { - reqURL := "https://openlibrary.org/search.json?limit=5&fields=title,author_name,cover_i,key,first_publish_year&title=" + url.QueryEscape(query) + // Use the general `q` search rather than `title`: it matches across all + // fields including translated/edition titles (e.g. "Policán" -> Dog Man), + // whereas `title` only matches a work's primary (usually English) title. + reqURL := "https://openlibrary.org/search.json?limit=5&fields=title,author_name,cover_i,key,first_publish_year&q=" + url.QueryEscape(query) var payload struct { Docs []struct {