Stemmer Question (was Re: [Xapian-discuss] sort by multiple values)

Olly Betts olly at survex.com
Tue Nov 15 13:09:29 GMT 2005


Please start a new thread for a new question.  Hijacking an existing
thread is confusing and makes it less likely your question will be
seen...

On Tue, Nov 15, 2005 at 01:35:37PM +0100, ivar at imaker.no wrote:
> A question about stemmer.
> 
> When I stem query I use the following code:
> pqp=new QueryParser();
>            Stem stem(sLang);
>            pqp->set_stemmer(stem);
>            pqp->set_database(*_pdatabase);
>            pqp->set_default_op(Query::OP_AND);
>            Query p=pqp->parse_query(_sXapian);
> 
> But it does not seem to stem the words.

What's the value of sLang?  If it's an empty string, you'll get a
stemming object which makes no changes.  Try printing out
stem->get_description() - that should say what language the stemming
object is set to.

If it's not that, it's rather hard to say what's happening from the
information given.  It could be a bug in the library or part of your
code you've not shown above.  Or perhaps you've just picked terms which
stem to themselves?  Or something else entirely perhaps.

Can you produce a small self-contained example program showing the
problem?

Cheers,
    Olly



More information about the Xapian-discuss mailing list