From 213e03e1f9624faa4a3a9813f1eac5035c1eb62a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 3 Aug 2022 20:03:55 +0000 Subject: miscidx: index inbox min/max article numbers This will be used to speed up NNTP group listings and IMAP startup with thousands of inboxes. --- lib/PublicInbox/MiscIdx.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/MiscIdx.pm') diff --git a/lib/PublicInbox/MiscIdx.pm b/lib/PublicInbox/MiscIdx.pm index 5faf5c66..76b33b16 100644 --- a/lib/PublicInbox/MiscIdx.pm +++ b/lib/PublicInbox/MiscIdx.pm @@ -108,12 +108,16 @@ EOF $doc->add_boolean_term('Q'.$eidx_key); # uniQue id $doc->add_boolean_term('T'.'inbox'); # Type + # force reread from disk, {description} could be loaded from {misc} + delete @$ibx{qw(-art_min -art_max description)}; if (defined($ibx->{newsgroup}) && $ibx->nntp_usable) { $doc->add_boolean_term('T'.'newsgroup'); # additional Type + my $n = $ibx->art_min; + add_val($doc, $PublicInbox::MiscSearch::ART_MIN, $n) if $n; + $n = $ibx->art_max; + add_val($doc, $PublicInbox::MiscSearch::ART_MAX, $n) if $n; } - # force reread from disk, {description} could be loaded from {misc} - delete $ibx->{description}; my $desc = $ibx->description; # description = S/Subject (or title) -- cgit v1.2.3-24-ge0c7