Subject: Re: [bug#77833] Xapian cache/search proof of concept

From: Noé Lopez <[email-masked]>
Date: Tue, 29 Apr 2025 21:27:49 +0200

Arun Isaac <[email-masked]> writes:

> Hi Noé,
>
> Works beautifully, thanks for hacking on this!
>
> How does the multiple profile support work? Do I have to build the index
> separately for each profile? What happens when I switch back and forth
> between profiles—do I need to rebuild the index each time I switch? And,
> where is the index stored?
>
> Cheers!
> Arun

We take the profile at /var/guix/profiles/per-user/<user>/current-guix/
and build an index for it. Yes. No. In
~/.cache/guix-xsearch/<profile-hash>.

What I originaly wanted to do was a derivation that computes the index
based on the current guix, but I couldn’t quite get it to work. It would
have been best since it would be in the store and benefit from guix gc.

Now that I think about it, this is a bad solution. It might not work
with guix time-machine.

I would like to know what you mean by switching profile, is that guix
pull generations or guix shell guix or something else?

All the best,
Noé