From 99def67b86c4d270e8cfda4d1fad418291b6f3a4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 7 Aug 2020 01:14:05 +0000 Subject: index: support --xapian-only switch This is useful for speeding up indexing runs when only Xapian rules change but SQLite indexing doesn't change. This mostly implies `--reindex', but does NOT pick up new messages (because SQLite indexing needs to occur for that). I'm leaving this undocumented in the manpage for now since it's mainly to speed up development and testing. Users upgrading to 1.6.0 will be advised to `--reindex --rethread', anyways, due to the threading improvements since 1.1.0-pre1. It may make sense to document for 1.7+ when there's Xapian-only indexing changes, though. --- script/public-inbox-index | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'script/public-inbox-index') diff --git a/script/public-inbox-index b/script/public-inbox-index index be518134..a52fb1bf 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -16,6 +16,7 @@ use PublicInbox::Xapcmd; my $compact_opt; my $opt = { quiet => -1, compact => 0, maxsize => undef, sync => 1 }; GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i prune sync! + xapianonly|xapian-only indexlevel|L=s maxsize|max-size=s batchsize|batch-size=s sequentialshard|seq-shard|sequential-shard)) or die "bad command-line args\n$usage"; @@ -59,8 +60,8 @@ if (defined $s) { my $mods = {}; foreach my $ibx (@ibxs) { # XXX: users can shoot themselves in the foot, with opt->{indexlevel} - $ibx->{indexlevel} //= $opt->{indexlevel} // - PublicInbox::Admin::detect_indexlevel($ibx); + $ibx->{indexlevel} //= $opt->{indexlevel} // ($opt->{xapianonly} ? + 'full' : PublicInbox::Admin::detect_indexlevel($ibx)); $ibx->{index_max_size} = $max_size; PublicInbox::Admin::scan_ibx_modules($mods, $ibx); } -- cgit v1.2.3-24-ge0c7