diff options
author | Eric Wong <e@80x24.org> | 2023-11-13 13:15:51 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-11-13 21:55:09 +0000 |
commit | 1f3fdeee8919d06b9293d34a2446a61cba730a0c (patch) | |
tree | b8c69f38f28f242d5c683b75f80a31c2e3eb4b60 | |
parent | 1b4c30a33d847e660286f011215e5b2385e29ca2 (diff) | |
download | public-inbox-1f3fdeee8919d06b9293d34a2446a61cba730a0c.tar.gz |
This is shorthand to enabling --associate with the most aggressive (and time-consuming) options available, starting from the Unix epoch and having an unlimited window to join on.
-rw-r--r-- | lib/PublicInbox/CodeSearchIdx.pm | 5 | ||||
-rwxr-xr-x | script/public-inbox-cindex | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/PublicInbox/CodeSearchIdx.pm b/lib/PublicInbox/CodeSearchIdx.pm index 54ddb68e..4ed5ea64 100644 --- a/lib/PublicInbox/CodeSearchIdx.pm +++ b/lib/PublicInbox/CodeSearchIdx.pm @@ -1146,6 +1146,11 @@ sub cidx_run { # main entry point local $self->{ASSOC_PFX} = \@ASSOC_PFX; local $self->{PENDING} = {}; local $self->{-pi_cfg}; + if ($self->{-opt}->{'associate-aggressive'}) { # shortcut + $self->{-opt}->{'associate-date-range'} //= '19700101000000..'; + $self->{-opt}->{'associate-window'} //= -1; + $self->{-opt}->{associate} //= 1; + } if (grep { $_ } @{$self->{-opt}}{qw(prune associate)}) { require File::Temp; $TMPDIR = File::Temp->newdir('cidx-all-git-XXXX', TMPDIR => 1); diff --git a/script/public-inbox-cindex b/script/public-inbox-cindex index b8133806..feb4a7f4 100755 --- a/script/public-inbox-cindex +++ b/script/public-inbox-cindex @@ -27,6 +27,7 @@ EOF my $opt = { fsync => 1, scan => 1 }; # --no-scan is hidden GetOptions($opt, qw(quiet|q verbose|v+ reindex jobs|j=i fsync|sync! dangerous indexlevel|index-level|L=s associate associate-window=i + associate-aggressive associate-date-range=s associate-prefixes=s@ batch_size|batch-size=s max_size|max-size=s include|I=s@ only=s@ all show-roots |