[Xapian-discuss] searching categories

Olly Betts olly at survex.com
Wed Apr 29 01:55:33 BST 2009


On Tue, Apr 28, 2009 at 10:55:10AM +0100, James Aylett wrote:
> On Tue, Apr 28, 2009 at 10:40:02AM +0200, james cauwelier wrote:
> 
> > Here is some testing I have done.  I have removed the space, so that I have
> > a unique indexable term.  Why can I index 'piep' and find it in a query,
> > while indexing and querying 'engelseboeken' doesn't seem to work in the same
> > way?
> 
> engelseboeken is stemming to engelseboek. piep is stemming to
> piep. You need to ensure that QueryParser-style stemming is occurring
> as you create the XCATEGORY-prefixed terms, and the easiest way of
> doing this is to use the TermGenerator.

Or if these category labels should be matched exactly without stemming
(e.g. file extensions) then you can make them boolean filters by using
QueryParser:add_boolean_prefix() instead of QueryParser::add_prefix().

Currently you're indexing them as if they were boolean filters but
searching as if they were probabilistic, hence the problems.

Cheers,
    Olly



More information about the Xapian-discuss mailing list