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

Jason Harris <[email protected]> Fri, 19 Aug 2005 00:24:05 -0400
Newsgroups gmane.comp.encryption.pgp.keyserver-folk,gmane.comp.gnu.gnupg.devel
Message-ID <[email protected]>
--===============0183416057==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT"
Content-Disposition: inline


--X1bOJ3K7DJ5YkBrT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.)
>=20
> 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=3D3D*jaso*harr*)(pgpdisabled=3D3D0=
))

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.

--=20
Jason Harris           |  NIC:  JH329, PGP:  This _is_ PGP-signed, isn't it?
[email protected] _|_ web:  http://keyserver.kjsl.com/~jharris/
          Got photons?   (TM), (C) 2004

--X1bOJ3K7DJ5YkBrT
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iJ0EARECAF0FAkMFXuNWGGh0dHA6Ly9rZXlzZXJ2ZXIua2pzbC5jb206MTEzNzEv
cGtzL2xvb2t1cD9vcD1nZXQmc2VhcmNoPTB4RDM5REEwRTMmd2VoYXZleW91bm93
PXRydWUACgkQSypIl9OdoOMNiQCff6PdsS1q6kfVvk+DD29trvn4jwMAoI3GLW5W
n+Vd/Aev2qcRyxym7kE/
=yMTv
-----END PGP SIGNATURE-----

--X1bOJ3K7DJ5YkBrT--

--===============0183416057==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
pgp-keyserver-folk mailing list
[email protected]
http://lists.kjsl.com/mailman/listinfo/pgp-keyserver-folk

--===============0183416057==--