From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C28701FFA1 for ; Fri, 25 Dec 2020 10:21:15 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 7/7] index: filter out indexlevel=basic from extindex Date: Fri, 25 Dec 2020 10:21:15 +0000 Message-Id: <20201225102115.6745-8-e@80x24.org> In-Reply-To: <20201225102115.6745-1-e@80x24.org> References: <20201225102115.6745-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: extindex users will likely want to use indexlevel=basic for per-inbox indices, however extindex itself doesn't support basic index level (yet?). Let's ensure we don't trip up extindex users who specify "-L basic" on the -index command-line. --- script/public-inbox-index | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/public-inbox-index b/script/public-inbox-index index c68f9224..0fdfddc0 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -84,8 +84,10 @@ for my $ei_name (@$update_extindex) { } else { die "extindex `$ei_name' not configured or found\n"; } + my $o = { %$opt }; + delete $o->{indexlevel} if ($o->{indexlevel}//'') eq 'basic'; $eidx_seen{$topdir} //= - push(@eidx, PublicInbox::ExtSearchIdx->new($topdir, $opt)); + push(@eidx, PublicInbox::ExtSearchIdx->new($topdir, $o)); } my $mods = {}; my @eidx_unconfigured;