Skip to main content.
home | support | download

Back to List Archive

Re: RE: Failing to find a word

From: Bill Moseley <moseley(at)>
Date: Fri Oct 08 1999 - 13:52:41 GMT
David Norris wrote:

>So, the problem is mostly with search.c.  Basically, we need to
>temporarily disable the stemming if there is a wildcard query in the
>current word.  This could also be affecting my Soundex stuff, since it
>works the same.

No, you want to stem the query since the index is stemmed.  In my search
front-end I scan the query for wild cards.  If I find them I stem them
before passing to Swish.  This was my work-around for that problem.  But it
doesn't solve the double-stemming problem that causes swish to fail to find

>Well, I think that I understand why it doesn't work.  But, I'm not
>clear how best to fix it.  (short of rewriting large portions of code)

>Basically, Line 770 [Stem()] needs to occur within expandstar() referenced on
>line 231.  Or, more correctly, we need some form of modular word
>filtering mechanism.  Stem() and expandstar() should be called from a
>wordfilter() function of some sort.

expandstar() seems like a good place to move the call to Stem(), as it
seems to be after any stop words are removed, and all the words are
processed one-by-one.  (again from my poor reading of the code.)

Anyone have a good perl-to-C converter?

  @query_words = 
      map { m/(.+)(\*?)$/; $2 ? Stem($1).$2 : Stem($1) } @query_words;


Bill Moseley
Received on Fri Oct 8 07:00:14 1999