Skip to content

feat: improve search relevance, add pagination, and clean up legacy templates - #319

Merged
Pierre-VF merged 11 commits into
mainfrom
pvf/fix-search
Jul 3, 2026
Merged

feat: improve search relevance, add pagination, and clean up legacy templates#319
Pierre-VF merged 11 commits into
mainfrom
pvf/fix-search

Conversation

@Pierre-VF

Copy link
Copy Markdown
Owner

Description:

This PR delivers several improvements to the search experience and UI, along with cleanup of legacy code.

Search improvements

  • Field-weighted keyword search: Results now rank by field importance — name (weight 5) > organisation (4) > description (3) > readme (2) — so title matches surface first.
  • Hybrid search support: When enabled, embeddings are combined with keyword search using rerank_hybrid_matches and a vector query on embedding_description. Includes a graceful fallback to keyword-only search if embeddings are not yet available.
  • Typo tolerance & prefix matching: Enabled to make search more forgiving of typos and partial queries.
  • Case-insensitive search preserved: Query normalization now strips whitespace without lowercasing, delegating case handling to Typesense.

Pagination

  • Added pagination UI with "Previous" / "Next" buttons on the results page.
  • Backend computes total pages and preserves all query parameters (except offset) across page navigation.

UI polish

  • Source count badges now display tiered colors: gold (>1000 projects), silver (>50), bronze (otherwise).
  • GitHub icon added to the navbar as a visual link to the repository.

Cleanup

  • Removed legacy v1 templates (_base.html, _navbar.html, results.html) no longer in use.
  • Removed truncated readme field from Typesense import to save memory.
  • Disabled commented-out hybrid search params in search_for_url.

Dependencies & config

  • Bumped version to 0.9.3.
  • Upgraded sentry-sdk[fastapi] from >=2.58.0 to >=2.61.1.
  • Added seed_typesense target to the Makefile.
  • Added rebase-energy/timedb to the indexed repositories.

Pierre-VF added 11 commits June 19, 2026 21:31
…ights

- Update keyword weights: name(5) > organisation(4) > description(3) > readme(2)
- Add embedding_readme to keyword fields with weight 1
- Use embedding_description as the vector_query field for semantic search
- Enable rerank_hybrid_matches to combine keyword + semantic scores
- Remove query lowercasing to preserve original case in results
- Update fallback path with same keyword weights
@Pierre-VF
Pierre-VF merged commit ab154a8 into main Jul 3, 2026
1 check passed
@Pierre-VF
Pierre-VF deleted the pvf/fix-search branch July 3, 2026 13:50
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.

1 participant