Document search result sources and show_sources param

This commit is contained in:
Christoph Haas 2026-08-23 10:51:37 +02:00
parent 4c736096ae
commit 0aebb74b9b

View file

@ -39,6 +39,14 @@ Queries that share no vocabulary with the package data (gibberish,
keyboard mash) return an honest empty result instead of random keyboard mash) return an honest empty result instead of random
semantic matches. 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 Package pages also show semantically **related packages**, computed as
a nearest neighbor query against the package's own description a nearest neighbor query against the package's own description
embedding - no external service call involved. embedding - no external service call involved.