[Xapian-discuss] Stemming and Quoted Phrases

Olly Betts olly at survex.com
Sun Oct 28 05:40:31 GMT 2007


On Sat, Oct 27, 2007 at 02:57:54PM -0400, Mike Boone wrote:
> $xapQP->set_stemming_strategy(XapianQueryParser::STEM_ALL);
> [...]
> If I search for "chemical engineers", including the quotes, the query
> generated is:
> 
> Xapian::Query((chemical:(pos=1) PHRASE 2 engineers:(pos=2)))

Hmm, I've had a look and the handling for STEM_ALL is just wrong here
at the moment.

I've fixed it in SVN and expanded on the documentation for STEM_NONE,
STEM_SOME, and STEM_ALL.

> I want it to return:
> 
> Xapian::Query((Zchemic:(pos=1) PHRASE 2 Zengin:(pos=2)))

I think it makes more sense for STEM_ALL to not add a "Z" prefix, to
avoid having to prefix all probabilistic terms with a "Z" if you're
indexing with all terms stemmed.  Can you see a problem with that?

> This worked under 0.8.5, is it possible to still do this under 1.0.3?

No, but it should work in 1.0.4 (coming soon!)

Cheers,
    Olly



More information about the Xapian-discuss mailing list