Skip to content

Conversation

johahor
Copy link
Member

@johahor johahor commented Nov 22, 2026 •

This PR makes sure we only show filters that is available for a search term. Read choices-and-reasoning.md to see what choices were decided for this issue.

Please test the functionality, and also tell me about the choices I made when it comes to the the Languages and Book format filters that you can read about in the documentation.

I was not familiar with the word Facets, and if you too are curious, feel free to read this explanation:

Fun fact: why "facets"?

The word originally means the cut faces of a gemstone. The idea comes from library science: in the 1930s, the Indian librarian S. R. Ranganathan introduced faceted classification, where a book is described from several independent angles at once instead of being placed in a single spot in a hierarchy. A book can be fantasy, in German and a hardcover, and each of these is a facet.

In search, the term is used for faceted search: the panel next to the results where you can narrow them down by properties. It's what you know from web shops as "Brand (12)" or "Size M (4)". Each property is a facet, and each value has a number of hits. Search engines like Solr, Elasticsearch and Algolia use the word "facets" for exactly this.

While running our tests before pushing i noticed we had 6 failing E2E tests, created an issue for it here #167

The code was written by AI (Claude)

Closes #158

@martakam
Copy link
Member

Tested the functionality itself too, seems to work good. Good job!

Co-authored-by: Martin Alexander Kaminski <martakam@stud.ntnu.no>
@johahor johahor merged commit 9dc4926 into main Nov 23, 2026
8 checks passed
@martakam martakam deleted the feat/show-relevant-filters branch November 25, 2026 22:40
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: only show relevant filters when query is present
3 participants