GNU bug report logs -
#58136
[PATCH] ui: Improve sort order when searching package names.
Previous Next
Reported by: Lars-Dominik Braun <lars <at> 6xq.net>
Date: Wed, 28 Sep 2022 09:28:02 UTC
Severity: normal
Tags: moreinfo, patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi,
zimoun <zimon.toutoune <at> gmail.com> skribis:
> Well, I propose something like see below (based on your patch):
>
> 1. keep the weight as 4
> 2. set the “namespace” weight to 1 (or 2 if you prefer)
>
> Otherwise, for example, generic name as CSV could artificially bump
> the relevance and hide relevant packages. For instance, compare
>
> guix search csv
>
> 3. use upstream-name if provided
Maybe something like:
(define %package-metrics
`((,package-name . 4)
(,package-upstream-name* . 4) ;or a lower weight, dunno
…))
where:
(define (package-upstream-name* package)
(or (assoc-ref (package-properties package) 'upstream-name)
(package-name-sans-namespace package))) ;strip "r-", "emacs-", etc.
WDYT?
(Perhaps ‘package-upstream-name’ could be taught about these implicit
name conversions done for R, Python, Emacs, etc.?)
Ludo’.
This bug report was last modified 2 years and 161 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.