full-text v. regular expression userid searches (was: Re: [svn] GnuPG - r3867 - trunk/keyserver)

David Shaw dshaw at jabberwocky.com
Fri Aug 19 16:55:06 CEST 2005


On Fri, Aug 19, 2005 at 09:49:19AM -0400, Jason Harris wrote:

> Anyway, pks and SKS use Berkeley DB, which only allows partial matching
> or range searching in sorted (Btree) dbs/tables from the beginning of
> words/keys (via DBcursor->c_get (..., DB_SET_RANGE), in case anyone
> wants to try it).  This is good for finding "david" as the first
> available word after the (currently) non-existent "davic," for
> example, but can't be used for other types of partial-word searches.
> 
> If you're thinking of a particular SQL feature, fine, but you'd have
> to run CKS, onak, or OpenPKSD to get SQL.  (Also, please provide URLs
> for any SQL/database feature(s) you are referring to.)

I'm not thinking of SQL or any particular technology.  Just pointing
out the same thing you are: pks and SKS use a backend storage system
that doesn't allow for searching in all the ways that some people
want.

If these people really want more searchability, it may well mean
significant changes in SKS and/or pks.  Which, I should caution, I'm
not arguing for.  I think the current system is a pretty decent
compromise.  I'd leave it alone.

> > Not that I'm suggesting regex searches.  I think they're overkill for
> > the problem at hand.  Even LDAP doesn't do full regex.
> 
> Well, allowing "anchoring" of the (full-word) searches with ^ and $
> sounds like it would be a good start,

Hard to do in a backwards compatible way, but at least it's not likely
that people use ^ and $ at the beginning and end of their real user
IDs.  Anyway, I can't say I think it's really necessary, but if SKS
starts to support it, I'll add support for it in gpgkeys_hkp.

David



More information about the Gnupg-devel mailing list