+ --no-fsync speed up indexing, risk corruption on power outage
+ -L LEVEL `basic', `medium', or `full' (default: full)
+ -E EXTINDEX update extindex (default: `all')
+ --all index all configured inboxes
+ --compact | -c run public-inbox-compact(1) after indexing
+ --sequential-shard index Xapian shards sequentially for slow storage
+ --jobs=NUM set or disable parallelization (NUM=0)
+ --batch-size=BYTES flush changes to OS after a given number of bytes
+ --max-size=BYTES do not index messages larger than the given size
+ --reindex index previously indexed data (if upgrading)
+ --since=DATE limit --reindex to changes after DATE
+ --until=DATE limit --reindex to changes before DATE
+ --rethread regenerate thread IDs (if upgrading, use sparingly)
+ --prune prune git storage on discontiguous history
+ --verbose | -v increase verbosity (may be repeated)
+
+BYTES may use `k', `m', and `g' suffixes (e.g. `10m' for 10 megabytes)
+See public-inbox-index(1) man page for full documentation.
+EOF
+my $opt = {
+ quiet => -1, compact => 0, max_size => undef, fsync => 1,
+ 'update-extindex' => [], # ":s@" optional arg sets '' if no arg given
+};
+GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i prune
+ fsync|sync! xapian_only|xapian-only dangerous
+ indexlevel|index-level|L=s max_size|max-size=s
+ batch_size|batch-size=s
+ since|after=s until|before=s
+ sequential-shard|seq-shard
+ no-update-extindex update-extindex|E=s@
+ fast-noop|F skip-docdata all C=s@ help|h))
+ or die $help;
+if ($opt->{help}) { print $help; exit 0 };
+die "--jobs must be >= 0\n" if defined $opt->{jobs} && $opt->{jobs} < 0;
+if ($opt->{xapian_only} && !$opt->{reindex}) {
+ die "--xapian-only requires --reindex\n";
+}
+if ($opt->{reindex} && delete($opt->{'fast-noop'})) {
+ warn "--fast-noop ignored with --reindex\n";