hescu / bibliotrack-book-library

0 stars 1 forks source link

Incorrect Search & Filter Results #22

Open rdesmond opened 1 month ago

rdesmond commented 1 month ago

@hescu - great work on this project! I have not found much to comment on in the code base - your work is very good! But I did find some funky behavior when playing around on the deployed app.

On the deployed web app, when I search for "The Grapes of Wrath" and filter the search to just "Title," the search results look correct and relevant. When I search using the "All" filter (includes Authors and ISBNs), the search results appear to be incorrect.

Good results example:

image

Bad results example:

image

When I search for "Steinbeck" and use the "All" and the "Author" filters, it returns good results.

When I search for a known ISBN such as "9783552074019" and use the "All" filter it returns zero results. When I search using the ISBN filter for "9783552074019" it returns results but they are incorrect.

image image

Lastly, I'm seeing different behavior searches. Now, when I search for "9783552074019" using the ISBN filter it returns zero results. Which is different than before.

I'd suggest looking a bit deeper into the searching and filtering functionality and what might be happening here.

rdesmond commented 1 month ago

@hescu I took a deeper look, and it appears you wrote a couple of distinct methods to perform the criteria-specific searches, but you're only calling one of them.

In your SearchController, you are calling performSearch() on line 64. This calls the performSearch() method in your GoogleBookAPI class - this method does not distinguish between the filter criteria. Although you have several other methods in there such as searchBookByIsbn() that are not used in this context.