[Xapian-discuss] QueryParser problems? (from Perl?)

Olly Betts olly at survex.com
Wed Sep 5 14:36:09 BST 2007


On Sun, Jul 22, 2007 at 01:11:17AM -0700, Eric Parusel wrote:
> INPUT: a word OR two NEAR "a phrase" NOT (too difficult) +eh

This example (from the pod documentation) is bogus.  You can't currently
do NEAR on a phrase.  I'll change the example to one which actually
works.

On Wed, Jul 25, 2007 at 12:23:01PM -0700, Eric Parusel wrote:
> I just put in an int (not a reference to an array) to signify the
> flags I wanted :s
> 
> # FLAG_BOOLEAN,PHRASE,LOVEHATE
> $qp->parse_query($query,7);    *shrug*

It's bad to hardwire numeric values for manifest constants into your
scripts as they are an implementation detail and could change in the
future (it's bad that the pod documentation even mentions them - I've
fixed that in SVN).  To specify multiple flags, combine them with
bitwise OR (|) - the documentation now mentions that too.

Cheers,
    Olly



More information about the Xapian-discuss mailing list