diff options
author | Eric Wong <e@80x24.org> | 2019-10-22 07:45:38 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-10-23 18:13:30 +0000 |
commit | f9fc5cf2e8cefda4a56d937ed217e47689fd7e49 (patch) | |
tree | 669cde20959431be6cb54996c3b43ebe38cc7e23 /lib/PublicInbox/OverIdx.pm | |
parent | a4b2bb62a0dde5054c5d2c0a7ea3fb3ff1806beb (diff) | |
parent | 1d6e0dbc3bad19acbfd90a9841a334dcaa0e4641 (diff) | |
download | public-inbox-f9fc5cf2e8cefda4a56d937ed217e47689fd7e49.tar.gz |
* regen: v2writable: use msgmap as multi_mid queue v2writable: move git->cleanup to the correct place v2writable: reindex handles 3-headered monsters v2writable: improve "num_for" API and disambiguate v2writable: set unindexed article number
Diffstat (limited to 'lib/PublicInbox/OverIdx.pm')
-rw-r--r-- | lib/PublicInbox/OverIdx.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm index e8df01c4..01ca6f11 100644 --- a/lib/PublicInbox/OverIdx.pm +++ b/lib/PublicInbox/OverIdx.pm @@ -337,6 +337,20 @@ sub remove_oid { $nr; } +sub num_mid0_for_oid { + my ($self, $oid, $mid) = @_; + my ($num, $mid0); + $self->begin_lazy; + each_by_mid($self, $mid, ['ddd'], sub { + my ($smsg) = @_; + my $blob = $smsg->{blob}; + return 1 if (!defined($blob) || $blob ne $oid); # continue; + ($num, $mid0) = ($smsg->{num}, $smsg->{mid}); + 0; # done + }); + ($num, $mid0); +} + sub create_tables { my ($dbh) = @_; |