Skip to main content.
home | support | download

Back to List Archive

Re: Disabling highlighting, stemming, etc.

From: Bill Moseley <moseley(at)>
Date: Mon Mar 01 2004 - 13:23:09 GMT
On Sun, Feb 29, 2004 at 02:37:34PM -0800, mike wrote:
> How does one turn off highlighting when using swish.cgi?

In the config (either in the program or in .swishcgi.conf)

Pick your idea of false:

    highlight => '',


    highlight => undef,


    highlight => 0,

My suggestion is to use

    highlight => undef,

because the others imply that you might simply use a true value to 
enable it, which is not correct.

That will also prevent the warnings about not having 

> While trying to figure out highlighting I noticed another
> problem. My error logs were filling up with errors about
> highlighting requiring for stemmed indexes. But my
> indexes weren't stemmed, or so I thought.

They likely were stemmed.  Here's one way to check:

$ swish-e -T index_header | grep Stemming
# Stemming Applied: 1
# Fuzzy Mode: Stemming_en

> Seems as though, at least in the config file
> UseStemming yes          # means USE Stemming
> UseStemming no           # STILL means USE Stemming

Yikes.  That's enabling the Norwegian stemmer module "no".  I also see a 
note in parse_conffile.c when dealing with UseStemming:

            /* Fix. "no" should default to norvegian
            if( strcasecmp(sl->word[1],"no") != 0 )

Looks like UseStemming will accept a language suffix instead of just yes 
or no.  I think UseStemming should just be yes or no.

Bill Moseley
Received on Mon Mar 1 05:23:11 2004