siftlode/backend/app/sync
npeter83 4395afc210 feat(feed): broaden search to a weighted document (title + keywords + queries + description)
Makes the local search behave more like YouTube's — finding videos by the
uploader's own keywords or the query that surfaced them, not only words in the
title. A DB-generated, weighted search_vector (migration 0032) replaces the
title-only FTS index:
- keywords: the creator's snippet.tags (free — already in the snippet we fetch),
  stored on enrich.
- search_terms: distinct live-search queries that surfaced the video (across all
  users), appended by the search route — folds YouTube's relevance into local
  search (a video YT returned for a query becomes findable by it even without a
  title match), the user's own idea.
- description (truncated) for broad recall on the existing catalog.
Weighted title(A) > keywords+queries(B) > description(C) so ts_rank keeps title
hits on top. A plain GIN index on the generated column guarantees index use (no
expression/param matching). Verified on localdev: recall 146->213 for one query;
7 'eurovision' hits via the document but not the title; index scan confirmed.
2026-06-30 02:00:38 +02:00
..
__init__.py feat: M2 (part 1) — subscription import, YouTube client, quota guard 2026-06-11 01:22:07 +02:00
autotag.py chore: rename remaining subfeed references to siftlode 2026-06-21 06:53:12 +02:00
maintenance.py fix(maintenance): drop dead status=="saved" scan 2026-06-26 03:15:36 +02:00
playlists.py refactor(playlists,feed): share feed-row projection & playlist helpers 2026-06-26 03:15:53 +02:00
runner.py chore: rename remaining subfeed references to siftlode 2026-06-21 06:53:12 +02:00
subscriptions.py chore: rename remaining subfeed references to siftlode 2026-06-21 06:53:12 +02:00
videos.py feat(feed): broaden search to a weighted document (title + keywords + queries + description) 2026-06-30 02:00:38 +02:00