From 0aebb74b9b604d385bffd3504427227f66a28a06 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 23 Aug 2026 10:51:37 +0200 Subject: [PATCH] Document search result sources and show_sources param --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 365d995..c330d9c 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,14 @@ Queries that share no vocabulary with the package data (gibberish, keyboard mash) return an honest empty result instead of random semantic matches. +**Why is this package in my results?** Each result knows which search +strategy produced it. The controller exposes this as +`@search_sources` (a hash mapping package ids to `:exact`, +`:name_prefix`, `:name_contains`, `:semantic` or `:fulltext`). For +debugging you can render a small badge on every result card by adding +`show_sources=1` to the URL, e.g. +`https://screenshots.debian.net/packages?search=sqlite&show_sources=1`. + Package pages also show semantically **related packages**, computed as a nearest neighbor query against the package's own description embedding - no external service call involved.