You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a really simple filter so search only shows results that match in the title or in the author. It didn't seem that was available from the API, so this does the same search, but limits the the books array to items that match. It seems to work well so far.
I'm not fully sold this is something that is required though. I've felt the audible search (which ABR uses under the hood) is fairly good at showing the correct results for title-only, author-only, or just a mix of search terms in the general direction of a book.
Do you have an example for some books that you tried searching for, but were pushed to later pages because all results were combined?
Additionally, this filtering is is very strict and quick to discard results that would be valid. If, for example, you typoed "The Silmarilion" (1 'L') the standard audible result would still know what you searched for, while your title matching discards the original "The Silmarillion".
Similarly for the authors, the ordering of the author's name matters. Entering "Brown Pierce" (or even "Brown, Pierce") works with the audible search, but your author filtering would reject the results.
Sure, "Virtual Light" was my test case book. There was only one title match, and the right one was on top, but there was a full page of search results that I found myself looking through. Most titles looked totally unconnected like "Bible Stories for Adults Modern Meets Mesopotamia: A Walk Through Life with Daniel Frank Milligan" and "The Ethics of Aristotle The Great Courses, Father Joseph Koterski S.J." Maybe connected on "Virtue"? I did think it was pretty funny really, but what got me thinking it could be a simple fix.
It's a good point on the restrictiveness. I was shooting for simple to implement but maybe I should have titled it "Exact search." :) Given that it's the same source search though, I could add some extra code to allow for misspellings. I'd been more thinking along the lines of, when I click on the authors name, if that used this mechanism I'd only see the author that I'd clicked on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added a really simple filter so search only shows results that match in the title or in the author. It didn't seem that was available from the API, so this does the same search, but limits the the books array to items that match. It seems to work well so far.