[Xapian-discuss] PHP5 - Query Parsing Bug

Yannick Warnier ywarnier at beeznest.org
Fri Apr 8 16:46:25 BST 2016



Le 26/03/16 21:16, Olly Betts a écrit :
> On Sat, Mar 26, 2016 at 07:21:23PM -0500, Yannick Warnier wrote:
>> I'm replying to a very old thread (9 years ago) here http://grokbase.com/t/xapian/xapian-discuss/072tprmr6h/php5-query-parsing-bug
>
> It's a fairly safe bet that if you search for an error message and find
> a 9 year old message which says it's been fixed, you aren't hitting the
> same issue, but rather a different issue which gives the same error
> message.
>
>> The error appear when trying to instanciate a new XapianQuery object
>> with a query element:
>>
>>    new XapianQuery($subquery);
>
> Their function doccomment says $extra is an array of arrays, so
> $subquery is an array.  But the code fails to say what operator to use
> to combine the elements in that array, so the error you're getting seems
> correct to me.
>
> Their should be something like:
>
>      $subqueries[] = new XapianQuery(XapianQuery::OP_AND, $subquery);
>
> Or maybe OP_OR - I'm not really sure what they are trying to do here.
>
> Presumably the developers of this software haven't tested cases where
> $extra is non-empty.
>
> Cheers,
>      Olly
>

Just to answer this temporarily: we've detected a series of changes 
required in our software and are making progress (not a top priority for 
us, so slowly making progress) towards a solution. Thanks for all the help!

Yannick



More information about the Xapian-discuss mailing list