[Zope-dev] Globbing lexicon bug?

sean.upton@uniontrib.com sean.upton@uniontrib.com
Tue, 31 Jul 2001 10:31:03 -0700


I'm having some ZCatalog search problems with wildcards in Zope 2.3.2.
Suppose I am searching for a Volkswagen, which is commonly listed in
Classified advertisements as 'VW' for brevity.  I try to index text with the
word VW, which works fine...  my problem is that a search for:

*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()?

My problem is that right now, I rewrite all queries from a search so that
all search terms are wrapped in * on each side of the word, as a means of
making the search friendly to the public...  This won't work if there is a
problem wrapping * around both sides of a 2 letter word, and I will have to
switch my rewrite to putting a * only at the end, or ideally, figure out a
way to fix the Lexicon code...

Sean

=========================
Sean Upton
Senior Programmer/Analyst
SignOnSanDiego.com
The San Diego Union-Tribune
619.718.5241
sean.upton@uniontrib.com
=========================