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

Jason Harris jharris at widomaker.com
Fri Aug 19 06:24:05 CEST 2005


On Thu, Aug 18, 2005 at 10:48:54PM -0400, David Shaw wrote:
> On Thu, Aug 18, 2005 at 09:32:23PM -0400, Jason Harris wrote:

> > LDAP?  (pks and SKS can, AFAIK.)
> 
> No, the other way around.  LDAP actually supports everything here and
> more since it has an actual search syntax with wildcards.  Both pks
> and SKS searches are much more limited and inherently substring.  In
> pks, "exact" means "exact substring with whole words" and "not exact"
> means "whole word match".  Not quite sure exactly what SKS does, but I
> know the search facility there is being tinkered with as we speak.

pks considers "words" to be 2 or more chars long, SKS allow single-
character "words."  Neither currently stores the full userid strings
in a separate db (table), so both match whole words, fetch the candidate
keys, and check for exact substring matches in the candidate keys.

Supporting (e.g., POSIX) Regular Expression searches would be interesting,
both in GPG and (HKP) keyserver keyrings, but searching the 2545113+
userids (on 2209793+ keys) on (well-synchronized) keyservers could be
unacceptably slow.  The raw text is 99425942+ bytes (94.8+MB).

NB:  The legacy LDAP server fails this search:

  gpgkeys: LDAP search for: (&(pgpuserid=3D*jaso*harr*)(pgpdisabled=3D0))

although the GD (LDAP) server quickly returns (always only one match)
0x341A91C4.  But, I don't consider the GD a good benchmark since it has
so few keys, can (and does?) stop looking after the first match, etc.

-- 
Jason Harris           |  NIC:  JH329, PGP:  This _is_ PGP-signed, isn't it?
jharris at widomaker.com _|_ web:  http://keyserver.kjsl.com/~jharris/
          Got photons?   (TM), (C) 2004
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 313 bytes
Desc: not available
Url : /pipermail/attachments/20050819/e46c3f60/attachment.pgp


More information about the Gnupg-devel mailing list