[Xapian-discuss] how can i use stopwords?

Richard Boulton richard at lemurconsulting.com
Wed Mar 12 09:35:50 GMT 2008


Sascha.Wojewsky at heinze.de wrote:
> Hi,
> 
> I do not understand the stopword function...
> 
> I've set the termgenerator like this:
> $self->{'Stemmer'} = new Search::Xapian::Stem(german2);
> $self->{'Stopper'} = new Search::Xapian::SimpleStopper();
> $self->{'TermGenerator'} = new Search::Xapian::TermGenerator;
> $self->{'TermGenerator'}->set_stemmer( $self->{'Stemmer'} );
> $self->{'TermGenerator'}->set_stopper( $self->{'Stopper'} );
> 
> I've thought that xapian now exclude the stopwords automatic by the stemming-language.

No, it's still up to users to set the list of stopwords to use.

> Could someone explain the stopword function?

You need to call SimpleStopper->add() for each word you want to be in 
the stopword list.

-- 
Richard



More information about the Xapian-discuss mailing list