openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Author ID should be searchable when searching by author

Open seabelis opened this issue 2 years ago • 2 comments

When searching for an author using advanced search, it is not possible to search by author ID. If one tries, there are no results. To search by ID, one must switch to the general search.

Evidence / Screenshot (if possible)

Screenshot 2023-05-25 at 11 37 03

Relevant url?

https://openlibrary.org/search/authors?q=OL781673A&mode=everything

Steps to Reproduce

  1. Go to ...https://openlibrary.org/search/authors
  2. Do ...search for a valid author ID, for example, OL781673A.
  • Actual: No results.
  • Expected: The author associated with that ID should be returned. https://openlibrary.org/authors/OL781673A/Stephanie_Urdang

Details

  • Logged in (Y/N)?
  • Browser type/version?
  • Operating system?
  • Environment (prod/dev/local)? prod

Proposal & Constraints

  • Use a regular expression to check if the search term is an open library author id, and if so, search just for key:/authors/{olid}.

Related files

Stakeholders

@cdrini

seabelis avatar May 25 '23 09:05 seabelis

Equally, title search on a work ID hits "No results found": https://openlibrary.org/search?q=title%3A+%22OL9170454W%22

LeadSongDog avatar May 30 '23 21:05 LeadSongDog

Dear @cdrini and @seabelis,

Today morning I encountered this issue and started working on it.

I have raised a Pull Request #7945 solving this issue.

I am new to open source and really enjoyed working on the openlibrary code base.

Please let me know if any changes are required to the PR and I will gladly get working on that.

Thanks Arghyadeep

arghyadeep10 avatar Jun 08 '23 14:06 arghyadeep10