[Xapian-discuss] Problems with AND-combined queries
Olly Betts
olly at survex.com
Wed Sep 10 04:17:05 BST 2008
On Mon, Sep 08, 2008 at 05:54:22PM +0200, Manuel Kägi wrote:
> $parser = new XapianQueryParser();
> $parser->add_prefix("type", "T");
I think you want add_boolean_prefix here rather than add_prefix.
> $parser->set_stemmer($stemmer);
> $parser->set_stemming_strategy(XapianQueryParser::STEM_SOME);
> $parser->set_database($this->xapianDb);
> $queryParsed = $parser->parse_query($pattern,
> $this->DEFAULT_SEARCH_FLAGS);
>
> So.. this all works if i search "type:document " OR any simple query
> (e.g. "backup"), but not the i want to search
> "backup AND type:document". Doing so i always get an empty result set.
For tips in debugging such cases, see:
http://trac.xapian.org/wiki/FAQ/NoMatches
Cheers,
Olly
More information about the Xapian-discuss
mailing list