From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:34976) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBHt4-0001yu-QL for guix-patches@gnu.org; Mon, 09 Mar 2020 08:52:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBHt3-0007yz-RE for guix-patches@gnu.org; Mon, 09 Mar 2020 08:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43990) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBHt3-0007yR-NW for guix-patches@gnu.org; Mon, 09 Mar 2020 08:52:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jBHt3-0002Vn-Mx for guix-patches@gnu.org; Mon, 09 Mar 2020 08:52:01 -0400 Subject: [bug#39258] [PATCH v2 0/3] Xapian for Guix package search Resent-Message-ID: MIME-Version: 1.0 References: <20200307133116.11443-1-arunisaac@systemreboot.net> <87sgijgb1v.fsf@gnu.org> <875zffcc87.fsf@gnu.org> <87a74qvusm.fsf@ambrevar.xyz> In-Reply-To: <87a74qvusm.fsf@ambrevar.xyz> From: zimoun Date: Mon, 9 Mar 2020 13:50:49 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: Pierre Neidhardt Cc: Arun Isaac , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 39258@debbugs.gnu.org On Mon, 9 Mar 2020 at 08:42, Pierre Neidhardt wrote: > > Arun Isaac writes: > > >> I=E2=80=99m not sufficiently familiar with Xapian=E2=80=99s query lang= uage. The > >> examples I had in mind were: > >> It=E2=80=99s not so much about regexps than it is about selecting indi= vidual > >> fields. > > > > I have totally not tested this, but I imagine that equivalent Xapian > > queries might look something like: > > > >> guix search | recsel -p name -e 'license ~ "LGPL 3"' > > > > guix search license:LGPL3 > > > >> guix search crypto library | \ > >> recsel -e '! (name ~ "^(ghc|perl|python|ruby)")' -p name,synopsis > > > > guix search crypto library AND (NOT ghc) AND (NOT perl) AND (NOT python= ) > > AND (NOT ruby) > > Indeed, if you look at the notmuch-search-terms man page, you'll see > that you can select fields. > In my opinion, the recsel format is fully superseded by Xapian. No! Because implementing the "fields" using Xapian is not done and it is not as straightforward as it seems. For sure, Xapian could do a lot of thing. But we should move one step after one step. Let first focus on speed and accuracy. For example, the fact that "guix search emacs" does not returns first the package 'emacs' using Xapian is really an issue. Cheers, simon