mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 10:02:17 -05:00
Two gaps in the new /search endpoint, neither yet released: Archived spools were always included, unlike GET /spool. /search now takes allow_archived (default false) and applies the same false-or-null clause spool.find uses, so the two endpoints agree on what "archived" hides. The exact-id shortcut honours it too -- otherwise searching an archived spool's id surfaced it regardless. Candidate selection ordered by id ASC before LIMIT 200, so on a database with more than 200 matches for a term only the 200 lowest ids were ever ranked and a newly added spool could not be found at all. Ordering descending makes the newest rows the ones that get ranked, which is the useful bias for an inventory that only grows. Ranking still re-sorts the survivors by match quality, so this changes which rows are considered, not how results are ordered. Integration tests cover both defaults and both opt-ins.