[Zope-dev] Globbing lexicon bug?

Evan Simpson evan@4-am.com
Tue, 31 Jul 2001 17:10:50 -0400


sean.upton@uniontrib.com wrote:

> *vw* - Yields only ads with 'vw' or 'VW' in the middle of the string
> vw* - yeilds ads including ones containing a 2-char word 'VW'
> 
> Why is this?  Is it a bug in the lexicon digram processing in get()?

This is a bug in createDigrams() in GlobbingLexicon.  This is fixed in 
CVS, and all you need to do is add the " + 1" in the line:

         for i in range(1,len(word) + 1):

Cheers,

Evan @ 4-am & Zope