[Xapian-discuss] Re: queryparser with WILDCARDS in php bindings not working

Mike Hsu mhsu at freeshell.org
Fri Mar 10 19:25:52 GMT 2006


Olly Betts <olly <at> survex.com> writes:

> 
> On Fri, Mar 10, 2006 at 04:05:20PM +0000, Martin Hearn wrote:
> > $a = new_queryparser();
> 
> You need to give the QueryParser a database use for expanding wildcards,
> so add this here:
> 
> queryparser_set_database($db);
> 
> > $query = queryparser_parse_query($a,"harry  
> > pott*",QueryParser_FLAG_WILDCARD);
> > 
> > Description: Xapian::Query(harry:(pos=1))
> 
> Cheers,
>     Olly
> 

Hi Olly,

Could you could have the wildcard handler produce an error if a DB isn't
specified?  I think right now it just continues along silently.

The docs could also be more explicit about needing the DB to be set first, at
least in the API documentation for FLAG_WILDCARD.  In retrospect this seems
obvious, but it would be a lot of help to those of us just getting our heads
around this stuff!

Thanks,
Mike





More information about the Xapian-discuss mailing list