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 367BC1F406 for ; Tue, 28 Nov 2023 17:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1701194109; bh=ooil9HfdApgQgQNTHr4U4PPJz85zXHi0ESdgiL0Ev2k=; h=Date:From:To:Subject:References:In-Reply-To:From; b=iu/CGZ1JLqe8CiWD01CHhaiYvHaL2dvTlqoFAG7dsdfV2HVbfa6psXfTD/PApAA1a df9qYTdkEMpvYTxNeha6Zhsafe0vZjBoNn6EieXSnliSA3ULoP7f/mkU6ygiCOVYjU HaIvO/Xk9e4qxufXQWX+2qpKz2AuwF7azTcaN7O4= Date: Tue, 28 Nov 2023 17:55:09 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 15/14] www: load cindex join data for ->ALL, too Message-ID: <20231128175509.M139356@dcvr> References: <20231128145628.1455176-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231128145628.1455176-1-e@80x24.org> List-Id: This ensures the /all/ extindex can have auto-associations with coderepos just like normal inboxes do. --- lib/PublicInbox/CodeSearch.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/PublicInbox/CodeSearch.pm b/lib/PublicInbox/CodeSearch.pm index 7c0dd063..5c5774cf 100644 --- a/lib/PublicInbox/CodeSearch.pm +++ b/lib/PublicInbox/CodeSearch.pm @@ -339,6 +339,15 @@ EOM my $s = $git->{ibx_score}; @$s = sort { $b->[0] <=> $a->[0] } @$s if $s; } + my $ALL = $pi_cfg->ALL or return; + my @alls_gits = sort { + scalar @{$b->{ibx_score} // []} <=> + scalar @{$a->{ibx_score} // []} + } values %$coderepos; + my $gits = $ALL->{-repo_objs} //= []; + push @$gits, @alls_gits; + my $cr_score = $ALL->{-cr_score} //= {}; + $cr_score->{$_->{nick}} //= scalar(@{$_->{ibx_score}//[]}) for @$gits; } sub repos_sorted {