From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:35738) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jC1mF-0002tR-J8 for guix-patches@gnu.org; Wed, 11 Mar 2020 09:52:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jC1mE-0001g6-FC for guix-patches@gnu.org; Wed, 11 Mar 2020 09:52:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47826) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jC1mE-0001fy-B7 for guix-patches@gnu.org; Wed, 11 Mar 2020 09:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jC1mE-0005DS-A9 for guix-patches@gnu.org; Wed, 11 Mar 2020 09:52:02 -0400 Subject: [bug#39258] [PATCH v2 0/3] Xapian for Guix package search Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200307133116.11443-1-arunisaac@systemreboot.net> <87sgijgb1v.fsf@gnu.org> <875zffcc87.fsf@gnu.org> <87r1y13jew.fsf@gnu.org> Date: Wed, 11 Mar 2020 14:50:51 +0100 In-Reply-To: (Arun Isaac's message of "Tue, 10 Mar 2020 19:47:57 +0530") Message-ID: <87sgifj8zo.fsf@gnu.org> MIME-Version: 1.0 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: Arun Isaac Cc: mail@ambrevar.xyz, 39258@debbugs.gnu.org, zimon.toutoune@gmail.com Hello! Arun Isaac skribis: >> We could provide a substitute for users who use only the official 'guix >> channel. However, as soon as users combine multiple channels, they=E2= =80=99ll >> have to build the index locally. > > We could build a separate Xapian database for each channel. Xapian does > support searching across multiple databases at once and will handle > merging the results together appropriately. Nice! > If I understand correctly, this means we can provide substitutes for > at least the official guix channel and let the user build the index > locally for other channels. Is that correct? I=E2=80=99m afraid not, or at least not trivially. Currently, profile hooks such as =E2=80=98%channel-profile-hooks=E2=80=99, = receive a complete profile=E2=80=94in this case, the composition of all the channels = the user chose. So if we want to achieve what you propose, we=E2=80=99d need to find anothe= r way to hook database generation. BTW, there=E2=80=99s also the problem of modules added dynamically with $GUIX_PACKAGE_PATH or =E2=80=98-L=E2=80=99. With the proposed scheme, it s= eems that they could no longer be searched. Is that correct? (Conversely the package cache is optional: it=E2=80=99s only used when it= =E2=80=99s considered authoritative, see (gnu packages). The API and behavior are exactly the same whether or not the package cache is used.) Thanks, Ludo=E2=80=99.