From ee8927c99ae68cbcdc5c1a842fd3b0bde47e986a Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Tue, 27 Feb 2018 08:29:09 +0000 Subject: search: query_xover uses skeleton DB iff available The skeleton DB is where we store all the information needed for NNTP overviews via XOVER. This seems to be the only change necessary (besides eventually handling duplicates) necessary to support our nntpd interface for v2 repositories. --- lib/PublicInbox/Search.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 6b14942a..a796cf65 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -317,11 +317,17 @@ sub num_range_processor { sub query_xover { my ($self, $beg, $end, $offset) = @_; my $qp = Search::Xapian::QueryParser->new; - $qp->set_database($self->{xdb}); + $qp->set_database($self->{skel} || $self->{xdb}); $qp->add_valuerangeprocessor($self->num_range_processor); my $query = $qp->parse_query("$beg..$end", QP_FLAGS); - _do_enquire($self, $query, {num => 1, limit => 200, offset => $offset}); + my $opts = { + enquire => enquire_skel($self), + num => 1, + limit => 200, + offset => $offset, + }; + _do_enquire($self, $query, $opts); } sub lookup_skeleton { -- cgit v1.2.3-24-ge0c7