From b212aee7e13c460b73a3632458ae96c39d9eac97 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Sat, 3 Mar 2018 20:18:34 +0000 Subject: nntp: fix NEWNEWS command I guess nobody uses this command (slrnpull does not), and the breakage was not noticed until I started writing new tests for multi-MID handling. Fixes: 3fc411c772a21d8f ("search: drop pointless range processors for Unix timestamp") --- lib/PublicInbox/Search.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/PublicInbox/Search.pm') diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 802984b0..4dc27472 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -330,6 +330,20 @@ sub query_xover { _do_enquire($self, $query, $opts); } +sub query_ts { + my ($self, $ts, $opts) = @_; + my $qp = $self->{qp_ts} ||= eval { + my $q = Search::Xapian::QueryParser->new; + $q->set_database($self->{skel} || $self->{xdb}); + $q->add_valuerangeprocessor( + Search::Xapian::NumberValueRangeProcessor->new(TS)); + $q + }; + my $query = $qp->parse_query($ts, QP_FLAGS); + $opts->{enquire} = enquire_skel($self); + _do_enquire($self, $query, $opts); +} + sub lookup_skeleton { my ($self, $mid) = @_; my $skel = $self->{skel} or return lookup_message($self, $mid); -- cgit v1.2.3-24-ge0c7