From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GLTtBLO0OGNdCAEAbAwnHQ (envelope-from ) for ; Sat, 01 Oct 2022 23:44:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yK/iBLO0OGOjJAEAauVa8A (envelope-from ) for ; Sat, 01 Oct 2022 23:44:19 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CF4812F4A9 for ; Sat, 1 Oct 2022 23:44:17 +0200 (CEST) Received: from localhost ([::1]:46370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oekHQ-0001AX-PS for larch@yhetil.org; Sat, 01 Oct 2022 17:44:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oekHD-0001AG-6R for guix-patches@gnu.org; Sat, 01 Oct 2022 17:44:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oekHC-0006nP-Qd for guix-patches@gnu.org; Sat, 01 Oct 2022 17:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oekHC-00039B-91 for guix-patches@gnu.org; Sat, 01 Oct 2022 17:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58136] [PATCH] ui: Improve sort order when searching package names. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 01 Oct 2022 21:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58136 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 58136@debbugs.gnu.org, Lars-Dominik Braun Received: via spool by 58136-submit@debbugs.gnu.org id=B58136.166466058612026 (code B ref 58136); Sat, 01 Oct 2022 21:44:02 +0000 Received: (at 58136) by debbugs.gnu.org; 1 Oct 2022 21:43:06 +0000 Received: from localhost ([127.0.0.1]:45785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oekGI-00037u-79 for submit@debbugs.gnu.org; Sat, 01 Oct 2022 17:43:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oekGG-00037Q-I1 for 58136@debbugs.gnu.org; Sat, 01 Oct 2022 17:43:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oekGA-0006fQ-29; Sat, 01 Oct 2022 17:42:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=NZPie+A1d6iTPeV+dpzLtwoGzl1JPNTevesa09OpInw=; b=cS2n5+iVAYzmUje2hZCo gvmixUm/lpgaxXnd8KGumpl4eiKpW72BEOVPz5yrAaSz2lhOL+Je+xXyqjER2Mf/lVp8sQjyiDQnX CXRerDKTVOGDpEbUOCo/6P5wv8/aGjokeId0bFYh7MXRDUUgbAHHNh34WY3O+1cK5QlgIqCedpcvh h+g+S8s6K22AwZD1SxVo/nlfjC369A2dqgWuvAZ8wkA6mbJLw+CRezKy4/3znz9hUVP0UWoJUNZFR 7BKF3IeMt7RoB9VurBsz1CzVnZTg/LL5T8fDRfpQOLKSzlv5hOjMn5mCz9fz8xPI4SFseDiJXib0i MTa08m+UoDcFnQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60260 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oekG9-0002Z5-Es; Sat, 01 Oct 2022 17:42:57 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <86wn9na82p.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?UTF-8?Q?D=C3=A9cadi?= 10 =?UTF-8?Q?Vend=C3=A9miaire?= an 231 de la =?UTF-8?Q?R=C3=A9volution, ?= jour de la Cuve X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 01 Oct 2022 23:42:54 +0200 In-Reply-To: <86wn9na82p.fsf@gmail.com> (zimoun's message of "Wed, 28 Sep 2022 16:26:38 +0200") Message-ID: <87v8p3b4pt.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664660658; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=NZPie+A1d6iTPeV+dpzLtwoGzl1JPNTevesa09OpInw=; b=dj/UsscksdzVbiAxUN0MruMkdfH0XdSVpQJcSOxvOaX2sQK4BBcqdNtxYmcNzfsCnIr4GC 17vweumWf8/sLJVeP5ajcfU0Agg79QD90v5EK0PDt1RKppN2tNyVOoJlEUgawJ1QlW4mRb VHWZOpYh3AJccPZMnvNXGyH6cwCLXM/uW51Cg5A66SGdDIlDKfyaZNXfdFUle7iF7HI6BH RCY8XbFgFCGb7HZlUX7gSrAZ7YEy1rz+foOFX2/c+P7Pb6AomztFGk620nq8Iu8yFXZqkG 4q5TLosIDRKYF9euv1mSYg8SDmz22Id0Iw4gSQlhxGc6ozAQKWODcEXjuTh8xQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664660658; a=rsa-sha256; cv=none; b=UYhVcG5P7Lb6JWXHOtNH6lH2GQf6hLE05rOgGmKjig/cQLdezMJcEuz64JhbD3CmaiZRpS 8XGL8G3HAPrKe1JFMJT9a1qIGbGgQ2eCp/Vf/PgJfZg9b5pZaTOq18kbYhQibzQ6IJHXq+ KzZ8tIS75Cy3xncdzDoEvxwmeIletXyz+hjhM0r195LUQgfa7F9UaQIMdoiWN68ViPbb8X VO7Zumy1jORUy2rb8LSf48lvfFfr5eAgcsyowT37WH2WVtiyuk9ZCEyQVcUL2F5ZplqJ1e CMvx0W1yADPgb/Ar2bFER9mvKeO4ZGx/HYdeblKVReGbjy3141+lxDzl3y8DrA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=cS2n5+iV; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.24 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=cS2n5+iV; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CF4812F4A9 X-Spam-Score: -2.24 X-Migadu-Scanner: scn1.migadu.com X-TUID: OwQ+/xUzLebN Hi, zimoun skribis: > Well, I propose something like see below (based on your patch): > > 1. keep the weight as 4 > 2. set the =E2=80=9Cnamespace=E2=80=9D 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 =E2=80=A6)) 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 =E2=80=98package-upstream-name=E2=80=99 could be taught about thes= e implicit name conversions done for R, Python, Emacs, etc.?) Ludo=E2=80=99.