[Xapian-discuss] Wildcards

Gupteshwar Joshi gupteshwar.joshi at gmail.com
Sat Feb 24 04:36:39 GMT 2007


Hello Olly,
I get this kind of error.
Fatal error: Call to a member function parse_query() on a non-object in
/home/gupteshwar/public_html/xapian_php/examples/simplesearch.php on line 48

does it requires anything extra to be added ?

Regards

On 2/22/07, Olly Betts <olly at survex.com> wrote:
>
> 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
>



-- 
              (((())))
              (@ @)
                 (_)
+----oOO------------Ooo----------+
|      Gupteshwar D Joshi            |
|                                              |
+------------------------------------+
              |___|___|
                 | | | |
              ooO Ooo


More information about the Xapian-discuss mailing list