[Xapian-discuss] Problems with AND-combined queries
Manuel Kägi
kaegi at granitsoft.ch
Mon Sep 8 16:54:22 BST 2008
Hi
I wnat to use Xapian to use Fulltext search on my Database application
I could index my Database Objects an can search for simple Pattern
I have set an Id Value by
$doc->add_value($this->ENTITY_ID, $entityId);
to retrive my Db-Identifiers of the Search results
also a added a Prefixed term
$doc->add_term("T".$entityTyp);
to be able to do search queries like "type:document"
therfore I set the Prefix to the QueryParser befor parsing the Query
$parser = new XapianQueryParser();
$parser->add_prefix("type", "T");
$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.
Has anyonone an idea why, and how this problem can be solved?
XapianQueryParser::FLAG_BOOLEAN is set.
Thanks for your help
--
Corvent GmbH
Anton Graff-Strasse 15
CH-8400 Winterthur
Telefon: 052 242 34 75
More information about the Xapian-discuss
mailing list