From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:54106) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8qVv-0000bm-7e for guix-patches@gnu.org; Mon, 02 Mar 2020 14:14:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8qVu-0007MH-5b for guix-patches@gnu.org; Mon, 02 Mar 2020 14:14:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60627) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j8qVu-0007M4-1D for guix-patches@gnu.org; Mon, 02 Mar 2020 14:14:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j8qVt-0005dL-T1 for guix-patches@gnu.org; Mon, 02 Mar 2020 14:14:01 -0500 Subject: [bug#39258] [PATCH 0/4] Xapian for Guix package search Resent-Message-ID: MIME-Version: 1.0 References: <20200227204150.30985-1-arunisaac@systemreboot.net> <87eeuf5dty.fsf@ambrevar.xyz> In-Reply-To: From: zimoun Date: Mon, 2 Mar 2020 20:13:33 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Arun Isaac Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Pierre Neidhardt , 39258@debbugs.gnu.org Hi, After a quick benchmark: a. It is faster. Between x2 and x3. Really? b. The xapian relevance should truncated and examined in more details. --8<---------------cut here---------------start------------->8--- time guix search emacs | recsel -p name,relevance | head -n18 name: emacs relevance: 33 name: emacs-with-editor relevance: 19 name: emacs-restart-emacs relevance: 19 name: emacs-epkg relevance: 18 name: guile-emacs relevance: 17 name: emacs-xwidgets relevance: 17 real 0m1.530s user 0m1.827s sys 0m0.074s --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- time /tmp/test/bin/guix search emacs | recsel -p name,relevance | head -n18 name: emacs-helm-pass relevance: 5.0774748262821685 name: emacs-spark relevance: 4.898640632723127 name: emacs-evil-smartparens relevance: 4.898640632723127 name: emacs-howm relevance: 4.8638448958830685 name: emacs-el-mock relevance: 4.8638448958830685 name: emacs-strace-mode relevance: 4.693676055650271 real 0m0.440s user 0m0.482s sys 0m0.058s --8<---------------cut here---------------end--------------->8--- Here for example, Xapian does not return the package 'emacs' itself as the first. And worse, it is not returned at all. That's said, I do not know if it is really faster since: --8<---------------cut here---------------start------------->8--- guix search emacs | recsel -C -P name | wc -l 829 --8<---------------cut here---------------end--------------->8--- and --8<---------------cut here---------------start------------->8--- /tmp/test/bin/guix search emacs | recsel -C -P name | wc -l 10 --8<---------------cut here---------------end--------------->8--- Maybe I am doing a mistake. Well, thank you Arun for the Xapian bindings which will improve the searching experience. :-) And now it needs some polishing. All the best simo