Subject: [bug#39258] [PATCH v2 0/3] Xapian for Guix package search

From: zimoun <[email-masked]>
Date: Mon, 9 Mar 2020 13:34:40 +0100

Hi,

On Sat, 7 Mar 2020 at 21:33, Ludovic Courtès <[email-masked]> wrote:
> Arun Isaac <[email-masked]> skribis:

> > Why not use a simpler package search results format like Arch Linux or Debian
> > does? We could just display the package name, version and synopsis like so.
> >
> > inkscape 0.92.4
> >     Vector graphics editor
> > inklingreader 0.8
> >     Wacom Inkling sketch format conversion and manipulation
> >
> > Why do we need the entire recutils format? If the user is interested, they can
> > always use `guix package --show` to get the full recutils formatted
> > info. Having shorter search results will make everything even faster and much
> > more readable. WDYT?
>
> What I like about the recutils format in this context is that it’s both
> human- and machine-readable.  The examples in the manual show how it can
> be useful to select the information displayed or to refine the search
> (info "(guix) Invoking guix package").
>
> Also: I’d recommend tackling one thing at a time.  :-)

I agree with Ludo.

And IMHO, we should add "guix search --format=<options>" mimicking how
"git log" works.
By default, displays as Arun proposes. Using '--format=full" as it is
done now by default.
And we could imagine "--format=%name \t %version \n %description" etc.

> I think we should look at a profile of ‘package->recutils’, there’s
> probably room for improvement there.

Interesting. Note that speed was the initial motivation but accuracy
is another important one. As we discussed earlier when I showed an
example with TF-IDF. And Xapian implemets the state-of-art (BM25) for
scoring.

All the best,
simon