Displaying 3 results from an estimated 3 matches for "filterqueri".
Did you mean:
filterquery
2017 Sep 12
2
perl bindings to Xapian::Query
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
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