GNU bug report logs - #36390
[PATCH 0/3] Improve 'guix search' relevance and display

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Wed, 26 Jun 2019 08:44:02 UTC

Severity: normal

Tags: 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

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#36390: closed ([PATCH 0/3] Improve 'guix search' relevance
 and display)
Date: Thu, 27 Jun 2019 09:20:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 27 Jun 2019 11:19:20 +0200
with message-id <87y31n2xnr.fsf <at> gnu.org>
and subject line Re: [bug#36390] [PATCH 0/3] Improve 'guix search' relevance and display
has caused the debbugs.gnu.org bug report #36390,
regarding [PATCH 0/3] Improve 'guix search' relevance and display
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
36390: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36390
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 0/3] Improve 'guix search' relevance and display
Date: Wed, 26 Jun 2019 10:43:38 +0200
Hello Guix!

This improves ‘guix search’ in two ways:

  1. The relevance score now excludes things that do not match *all*
     the regexps.  So ‘guix search go game’ returns 28 results instead
     of 1,245 and the first one is ‘gnugo’; ‘guix search ssh client’
     returns 14 results instead of 510; ‘guix search guile crypto’
     returns just ‘guile-gcrypt’ instead of 279 results.

  2. ‘guix search’ and ‘guix system search’ now write at most a full
     screen of results.  You can pipe through a pager to view all the
     results.

Thoughts?

Ludo’.

Ludovic Courtès (3):
  ui: 'relevance' considers regexps connected with a logical and.
  syscalls: Add 'terminal-rows'.
  ui: Add 'display-search-results' and use it.

 guix/build/syscalls.scm        | 37 +++++++++++------
 guix/scripts/package.scm       | 41 ++++++++-----------
 guix/scripts/system/search.scm | 44 +++++++++-----------
 guix/ui.scm                    | 75 ++++++++++++++++++++++++++++------
 tests/syscalls.scm             |  5 ++-
 tests/ui.scm                   | 27 +++++++++++-
 6 files changed, 155 insertions(+), 74 deletions(-)

-- 
2.22.0



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 36390-done <at> debbugs.gnu.org
Subject: Re: [bug#36390] [PATCH 0/3] Improve 'guix search' relevance and
 display
Date: Thu, 27 Jun 2019 11:19:20 +0200
Hello!

Ricardo Wurmus <rekado <at> elephly.net> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> This improves ‘guix search’ in two ways:
>>
>>   1. The relevance score now excludes things that do not match *all*
>>      the regexps.  So ‘guix search go game’ returns 28 results instead
>>      of 1,245 and the first one is ‘gnugo’; ‘guix search ssh client’
>>      returns 14 results instead of 510; ‘guix search guile crypto’
>>      returns just ‘guile-gcrypt’ instead of 279 results.
>>
>>   2. ‘guix search’ and ‘guix system search’ now write at most a full
>>      screen of results.  You can pipe through a pager to view all the
>>      results.
>
> Perfect, thank you for the patches!

It seems rather non-controversial.  :-)

Pushed:

  4311cf965c ui: Add 'display-search-results' and use it.
  4593f5a654 syscalls: Add 'terminal-rows'.
  8874faaaac ui: 'relevance' considers regexps connected with a logical and.

> (I wonder why you chose to use “(cut > <> 0)” instead of “positive?” for
> checking if a value is greater than zero.)

Actually no good reasons, I wanted to amend it and then forgot.

Thanks,
Ludo’.


This bug report was last modified 5 years and 327 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.