From: Eric Wong (Contractor, The Linux Foundation) Date: Tue, 27 Feb 2018 08:29:09 +0000 (+0000) Subject: search: query_xover uses skeleton DB iff available X-Git-Tag: v1.1.0-pre1~206 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ee8927c99ae68cbcdc5c1a842fd3b0bde47e986a;p=public-inbox.git 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. --- 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 {