feat(search): relevance ranking + websearch_to_tsquery #13

Merged
cesnimda merged 2 commits from feature/search-relevance-ranking into develop 2026-07-01 21:08:54 +02:00
Owner

First slice of the search-core epic (docs/discovery/05).

  • Relevance ranking (ts_rank_cd via Npgsql RankCoverDensity) when a free-text query is present; date order unchanged for browse-only requests.
  • Upgraded plainto_tsquery -> websearch_to_tsquery (quotes/OR/-exclude support).
  • Also includes an isolated chore commit fixing pre-existing dotnet-format drift on develop that was blocking the pre-commit hook.

Verified ranking SQL semantics directly against a live Postgres instance (not just docs). New regression test locks the date-order fallback path. All 40 tests pass; Release build clean.

🤖 Generated with Claude Code

First slice of the search-core epic (docs/discovery/05). - Relevance ranking (ts_rank_cd via Npgsql RankCoverDensity) when a free-text query is present; date order unchanged for browse-only requests. - Upgraded plainto_tsquery -> websearch_to_tsquery (quotes/OR/-exclude support). - Also includes an isolated chore commit fixing pre-existing dotnet-format drift on develop that was blocking the pre-commit hook. Verified ranking SQL semantics directly against a live Postgres instance (not just docs). New regression test locks the date-order fallback path. All 40 tests pass; Release build clean. 🤖 Generated with Claude Code
cesnimda added 2 commits 2026-07-01 21:04:45 +02:00
Purely mechanical (object-initializer line-splitting per the project's format
rules) — no behavior change. This drift on develop was blocking the pre-commit
hook's solution-wide 'dotnet format --verify-no-changes' check for unrelated
commits. Verified: diff is cosmetic only (spot-checked), build + all 39 tests
still pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(search): relevance ranking + websearch_to_tsquery
CI / backend (pull_request) Successful in 1m14s
CI / frontend (pull_request) Successful in 29s
Security / secrets (pull_request) Successful in 5s
Security / dependencies (pull_request) Successful in 1m20s
4f415ce7bf
Slice 1 of search-core (docs/discovery/05, MVP): replace date-only ordering with
ts_rank_cd relevance ranking (Npgsql RankCoverDensity) when a free-text query is
present, recency as a tiebreaker; browse-only requests (no query) keep today's
date-descending order unchanged. Upgrade plainto_tsquery -> websearch_to_tsquery
so quotes ("exact phrase"), OR, and -exclusions work as users already expect
from web search boxes.

Verified: ranking SQL semantics (plain/phrase/exclusion/ts_rank_cd score) checked
directly against a live Postgres instance, not just Npgsql's docs. Added a
regression test locking the date-order fallback path (the one behaviour testable
without a live Postgres, matching this repo's existing no-Testcontainers
convention -- see AuthEndpointsTests.TestAppFactory). All 40 tests pass; full
Release build clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cesnimda merged commit a9be48daee into develop 2026-07-01 21:08:54 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cesnimda/Inboxintel#13