guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

‘guix package --search’ sorts results by relevance


From: Ludovic Courtès
Subject: ‘guix package --search’ sorts results by relevance
Date: Wed, 14 Jun 2017 09:55:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello Guix!

With commit 4e863eb35fd8337eab48928e7733b7f6b7b2c242 ‘guix package
--search’ attempts to compute a “relevance score” for each matching
package, based on the number of matching regexps and the number of
matches for each regexp, and sorts its output by relevance:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix package -s scheme -s compiler | recsel -p name,relevance 
| head -20
name: chez-scheme
relevance: 15

name: gambit-c
relevance: 12

name: mit-scheme
relevance: 9

name: microscheme
relevance: 9

name: bigloo
relevance: 9

name: vim-scheme
relevance: 6

name: swig
relevance: 6
--8<---------------cut here---------------end--------------->8---

We could probably tweak the score function a bit more, but overall I
think this improves over what we had previously.

Thoughts?

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]