Skip to content

Conversation

johahor
Copy link
Member

@johahor johahor commented Nov 23, 2026 •

This PR removed the suggested books when no search matches, but keeps the suggestions when the search query is above a certain threshold in similiarity. See choices-and-reasoning.md for a more comprehensive explanation. In short "Lord fo thy rngs" doesn't show any books since it isn't really close to the actual search term, but "Lord fo the rings" will show books with similar Title/author, with a helper text that no books were found for the specific search term.

6 E2E tests still fail, but is fixed in #169.

Me and @martakam discussed the threshold in #162, however we did not decide on anything there. @martakam mentioned the possibility to change it to 0.5, but if I had to change it, I would rather make it even more strict to not include books that isn't the one a user searched for. For that reason, I think 0.6 is a good middle-way.

Claude helped write the code.
Closes #159

@johahor johahor requested a review from a team as a code owner November 23, 2026 08:27
@johahor johahor added the enhancement New feature or request label Nov 23, 2026
hestro
hestro previously approved these changes Nov 23, 2026
Copy link
Member

@hestro hestro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected! And I agree that 0.6 seems to be a good threshold

martakam
martakam previously approved these changes Nov 23, 2026
@johahor johahor dismissed stale reviews from martakam and hestro via f793f42 November 23, 2026 20:40
@martakam martakam merged commit ca1c3a6 into main Nov 23, 2026
8 checks passed
@martakam martakam deleted the feat/no-unrelated-suggestions branch November 25, 2026 22:41
Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: do not show any suggestions when the user's query is not found
3 participants