[Xapian-discuss] Multiple filters with PHP? How to?
athlon athlonf
athlonkmf at yahoo.com
Tue Jan 8 21:25:15 GMT 2008
Yes there are documents matching both boolean terms:
Using filter G68 gives me 219 results
Parsed query is: Xapian::Query((Zandi:(pos=1) FILTER G68))
Using filter XAUTHORID5 gives me 19 results
Parsed query is: Xapian::Query((Zandi:(pos=1) FILTER XAUTHORID5))
But on a different subject:
If I want to filter at datetime and string, how should I do that?
author = "the author"
$qarray[] = new XapianQuery('Athe author');
Won't give anything
As well: startdate = ">01-01-2008"
----- Original Message ----
From: James Aylett <james-xapian at tartarus.org>
To: xapian-discuss at lists.xapian.org
Sent: Tuesday, January 8, 2008 10:07:39 PM
Subject: Re: [Xapian-discuss] Multiple filters with PHP? How to?
On Tue, Jan 08, 2008 at 12:23:59PM -0800, athlon athlonf wrote:
> However, I'm not getting any results from the filtering as you
described.
> This is how the query is eventually parsed (when searching for
"andy):
> Parsed query is: Xapian::Query((Zandi:(pos=1) FILTER (G68 AND
XAUTHORID5)))
>
> When simply using filter the filters indivdually I'd get hundreds of
> results, but when combined in an AND-clause they don't work anymore.
Do you have documents that match both those boolean terms? Try just
searching for the terms directly without the rest of the query.
> BTW. I've tried your hints a bit, I think that when I need to add
> more filters, this might should be the correct way? It does give the
> same parsed query.
>
> $qarray[] = new XapianQuery('G68');
> $qarray[] = new XapianQuery('XAUTHORID5');
>
> $filter = new XapianQuery(XapianQuery_OP_AND, $qarray);
> $query = new XapianQuery(XapianQuery_OP_FILTER, $probquery, $filter);
That looks believable, yes - I just can't remember which options PHP
supports :-)
J
--
/--------------------------------------------------------------------------\
James Aylett
xapian.org
james at tartarus.org
uncertaintydivision.org
_______________________________________________
Xapian-discuss mailing list
Xapian-discuss at lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
More information about the Xapian-discuss
mailing list