guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guix Website] A Search Page for Packages


From: John Kehayias
Subject: Re: [Guix Website] A Search Page for Packages
Date: Mon, 21 Nov 2022 20:30:21 +0000

Hi Chris

On Sat, Nov 19, 2022 at 04:13 PM, Christopher Baines wrote:
> The search functionality is being provided by the Guix Data Service,
> which in turn is searching through records in a PostgreSQL database.
>
> The relevant code is here [1], and it's the plainto_tsquery bit that
> starts the transformation from a string to what PostgreSQL is using for
> the search.
>
> 1:
> <https://git.savannah.gnu.org/cgit/guix/data-service.git/tree/guix-data-service/model/package.scm#n144>
>

I see. My knowledge of PostgreSQL is limited to emergency measures for when 
something happens with the home server :)

> So yeah, I don't think the way it's implemented currently supports * as
> a wildcard, although maybe that could be supported by changing the way
> the query works.

A low priority, but it would be nice on the list of things for future versions 
to improve the search. I think basic substring/partial matches would go a long 
way. Probably very easy for the PostgreSQL-ers. Or maybe make it match as best 
it can the result lists from "guix search" as a nice parallel.

Anyway, thanks again for this, great to see it live!

John




reply via email to

[Prev in Thread] Current Thread [Next in Thread]