On Thu, Feb 22, 2007 at 05:29:29PM +0530, Gupteshwar Joshi
wrote:> How could I enable the WILDCARDS in it ?
> I followed with the online manual which says it is disabled by default
> there given some method to enable but I am not understood it properly
> where to make changes.
You need to pass extra flags to Xapian::QueryParser::parse_query(). For
PHP4:
$queryparser->parse_query($string,
QueryParser_FLAG_BOOLEAN|QueryParser_FLAG_PHRASE|QueryParser_FLAG_LOVEHATE|QueryParser_FLAG_WILDCARD);
And for PHP5:
$queryparser->parse_query($string,
XapianQueryParser::FLAG_BOOLEAN|XapianQueryParser::FLAG_PHRASE|XapianQueryParser::FLAG_LOVEHATE|XapianQueryParser::FLAG_WILDCARD);
The default flags are (currently) BOOLEAN, PHRASE, and LOVEHATE. There
should be a shorthand for "the default flags", but there isn't
currently.
Cheers,
Olly