perl bindings to Xapian::Query
Alex Aminoff
aminoff at nber.org
Tue Sep 12 21:47:52 BST 2017
QueryParser is great, but I would like to make a query myself, so I can
filter results by a specified value (in this case restricting by epoch
time after a certain value)
My code looks like this, and compiles, and appears like it should work
according to the perl source:
my $query = $qp->parse_query($querystr);
if ($datefilter) {
my $filterepoch = time() - ($datefilter * 60 * 60 * 24);
my $filterquery =
Xapian::Query->new(OP_VALUE_GE,I_DATE,$filterepoch);
$query = Xapian::Query->new(OP_FILTER,$query,$filterquery);
}
This appears to die on Xapian::Query->new with
No matching function for overloaded 'new_Query' at
/usr/local/lib/perl5/site_perl/Xapian.pm line 1282.
I see in Xapian.pm where Xapian::Query attempts to call
Xapianc::new_Query . Is there some other way I am supposed to do this?
I should say that I am using xapian-bindings-1.4.4 which I compiled and
installed myself.
Thanks,
- Alex Aminoff
NBER
More information about the Xapian-discuss
mailing list