about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-02-27 08:29:09 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-02-28 23:06:20 +0000
commitee8927c99ae68cbcdc5c1a842fd3b0bde47e986a (patch)
tree8fe32ff3af31b6d74d9fa5c124eb6784473c6a1b
parent44afe76a0a351e350e18a94876fc30edc4adc404 (diff)
downloadpublic-inbox-ee8927c99ae68cbcdc5c1a842fd3b0bde47e986a.tar.gz
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.
-rw-r--r--lib/PublicInbox/Search.pm10
1 files 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 {