Skip to content

feat(lxl-web): Suggest search filters#1505

Merged
olovy merged 17 commits intodevelopfrom
feature/lxl-4648-list-search-filters
Mar 2, 2026
Merged

feat(lxl-web): Suggest search filters#1505
olovy merged 17 commits intodevelopfrom
feature/lxl-4648-list-search-filters

Conversation

@olovy
Copy link
Contributor

@olovy olovy commented Feb 25, 2026

Depends on libris/definitions#560

supersearch

  • List all search filters in supersearch (based on category searchfilter on property)
  • Suggest filters when typing

help page

POC
Add route /help/filters for listing all available search filters.

How do we want to render them? table? cards? etc

I think we should display:

  • label (all langs, current locale first)
  • librisQueryCode
  • comment (or more specific description for search, see TODO)
  • bonus: propertyChainAxiom inside details element
    • see e.g hyllsignum / WHYL

Tickets involved

LXL-4648

Summary of changes

  • Add getPropertiesByCategory to VocabUtil
  • Add route /help/filters

TODO

  • SuperSearchWrapper should suggest for hiddenLabel too (so that e.g. "Placering" can be found by typing "Bestånd")
  • Do getPropertiesByCategory('searchFilter') only once in hooks.server.ts?
  • In which cases do we need a separate description from :comment?

Copy link
Contributor

@johanbissemattsson johanbissemattsson left a comment

Choose a reason for hiding this comment

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

Looks good code-wise! 👍 I'm looking forward to using this in action!

I think it makes sense to do getPropertiesByCategory('searchFilter') once in hooks.server.ts.
We could also add an cached /api/searchFilters/+server.ts route which SuperSearchWrapper can fetch the required data from.

@olovy olovy force-pushed the feature/lxl-4648-list-search-filters branch from 41806d8 to 55292f6 Compare February 26, 2026 17:27
@olovy olovy force-pushed the feature/lxl-4648-list-search-filters branch from 278e276 to 861fbd9 Compare February 26, 2026 17:49
@olovy olovy changed the title experimental(lxl-web): List all search filters feat(lxl-web): Suggest search filters Feb 27, 2026
@olovy olovy marked this pull request as ready for review February 27, 2026 15:46
@olovy olovy merged commit c6b743e into develop Mar 2, 2026
2 checks passed
@olovy olovy deleted the feature/lxl-4648-list-search-filters branch March 2, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants