diff options
author | Eric Wong <e@80x24.org> | 2022-08-03 20:03:55 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-08-04 07:00:58 +0000 |
commit | 213e03e1f9624faa4a3a9813f1eac5035c1eb62a (patch) | |
tree | 070e38ebf61c4d1f62779f9e451cffef47442835 /lib/PublicInbox/Search.pm | |
parent | 63dce18973d63837efd89225085fe144a8954bdf (diff) | |
download | public-inbox-213e03e1f9624faa4a3a9813f1eac5035c1eb62a.tar.gz |
This will be used to speed up NNTP group listings and IMAP startup with thousands of inboxes.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r-- | lib/PublicInbox/Search.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index b6141f68..2feb3e13 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -543,9 +543,10 @@ sub help { \@ret; } +# always returns a scalar value sub int_val ($$) { my ($doc, $col) = @_; - my $val = $doc->get_value($col) or return; # undefined is '' in Xapian + my $val = $doc->get_value($col) or return undef; # undef is '' in Xapian sortable_unserialise($val) + 0; # PV => IV conversion } |