[Xapian-discuss] QueryParser (I think) question

Andreas Marienborg andreas at startsiden.no
Tue May 22 15:08:54 BST 2007


On May 22, 2007, at 4:00 PM, James Aylett wrote:

> On Tue, May 22, 2007 at 02:34:42PM +0200, Andreas Marienborg wrote:
>
>> I would like to search in items that are either from source 1 or
>> source 2 for instance,
>> so I tried the following: "source:1 OR source:2", but that results in
>> the following query after
>> parsing:
>>
>>  Xapian::Query((or:(pos=1) FILTER (S1 AND S2)))
>>
>> is that expected? am I trying to do something that I cannot do? or am
>> I just doing something wrong?
>
> It's not what I'd expect. The query parser came out of omega, whose
> documentation states that boolean terms are combined by OR for similar
> prefixes, then AND for the different prefixes to create the overall
> FILTER clause. Looks like this documentation is no longer correct :-/
>

But it is expected to ignore my OR and convert that to a "regular" term?

if I omit the OR it produces  Xapian::Query((S1 AND S2))

I have     $self->qp->set_default_op(OP_AND);

in my setup, but commenting it out does no difference.


Is this a documentation problem, or a code-problem?

If its a documentation problem, is there any way to achive what I am  
trying to do?


- andreas




More information about the Xapian-discuss mailing list