search for: filterquery

Displaying 3 results from an estimated 3 matches for "filterquery".

2017 Sep 12
2
perl bindings to Xapian::Query
...ting 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...
2016 May 16
2
Weighting recent results
I was thinking about this some more: Is there a reason I can't just weight by some function of recency at indexing time? $weight = get_weight_based_on_recency(...); $tg->index_text($txt,$weight); If I wanted to allow the user the option of searching either in recency-weighted mode or not, I could index each document into 2 different databases, one with and one without. This avoids
2017 Sep 12
0
perl bindings to Xapian::Query
On Tue, Sep 12, 2017 at 04:47:52PM -0400, Alex Aminoff wrote: >         my $filterepoch = time() - ($datefilter * 60 * 60 * 24); >         my $filterquery = > Xapian::Query->new(OP_VALUE_GE,I_DATE,$filterepoch); I think your issue here is that $filterepoch is a number rather than a string (a Perl scalar can have different representations internally). In t/valuerange.t this testcase works: | ok( $query = Xapian::Query->new(OP_VALUE_GE, 0, &...