From fe3883762faf67fd6c4624ee721000e1f36bc59b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 21 Nov 2023 12:43:15 +0000 Subject: cindex: rename --associate to --join, test w/ real repos The association data is just stored as deflated JSON in Xapian metadata keys of shard[0] for now. It should be reasonably compact and fit in memory for now since we'll assume sane, non-malicious git coderepo history, for now. The new cindex-join.t test requires TEST_REMOTE_JOIN=1 to be set in the environment and tests the joins against the inboxes and coderepos of two small projects with a common history. Internally, we'll use `ibx_off', `root_off' instead of `ibx_id' and `root_id' since `_id' may be mistaken for columns in an SQL database which they are not. --- script/public-inbox-cindex | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'script') diff --git a/script/public-inbox-cindex b/script/public-inbox-cindex index feb4a7f4..97890c1b 100755 --- a/script/public-inbox-cindex +++ b/script/public-inbox-cindex @@ -26,11 +26,9 @@ See public-inbox-cindex(1) man page for full documentation. 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@ + indexlevel|index-level|L=s join:s@ batch_size|batch-size=s max_size|max-size=s - include|I=s@ only=s@ all show-roots + include|I=s@ only=s@ all show:s@ project-list=s exclude=s@ sort-parallel=s sort-compress-program=s sort-buffer-size=s d=s update|u scan! prune dry-run|n C=s@ help|h)) @@ -45,7 +43,7 @@ $SIG{PIPE} = 'IGNORE'; # require lazily to speed up --help require PublicInbox::Admin; PublicInbox::Admin::do_chdir(delete $opt->{C}); -my $cfg = PublicInbox::Config->new; +my $cfg = $opt->{-pi_cfg} = PublicInbox::Config->new; my $cidx_dir = $opt->{d}; PublicInbox::Admin::require_or_die('Xapian'); PublicInbox::Admin::progress_prepare($opt); -- cgit v1.2.3-24-ge0c7