From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C76031FA40 for ; Mon, 13 Nov 2023 13:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1699881356; bh=Ooo0Tm/6dX3ZBEELuHjj7thhi8DoYBsn53xNZXViT7A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rK6BJPXor10edcDB2843IYkxkaPOlI/V5lW4dTHS60CNDTC20ONoONmAGGV51R4eY hEu/2uGeW39a/FdxcCxySB4CuMAiA9F0qZAmT1iM0YoUhcL/rXYIldgqF7rWeBSOHf x72v8AL0HVPByLyl9ta6URv/CcdyIrQyUjfJLq9o= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 18/18] cindex: support --associate-aggressive shortcut Date: Mon, 13 Nov 2023 13:15:51 +0000 Message-Id: <20231113131551.843230-19-e@80x24.org> In-Reply-To: <20231113131551.843230-1-e@80x24.org> References: <20231113131551.843230-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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. --- lib/PublicInbox/CodeSearchIdx.pm | 5 +++++ script/public-inbox-cindex | 1 + 2 files changed, 6 insertions(+) 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