=over
+=item --jobs=JOBS, -j
+
+Control the number of Xapian indexing jobs in a
+(L<public-inbox-v2-format(5)>) inbox.
+
+C<--jobs=0> is accepted as of public-inbox 1.6.0 (PENDING)
+to disable parallel indexing.
+
+Default: the number of existing Xapian shards
+
=item --compact / -c
Compacts the Xapian DBs after indexing. This is recommended
happens both before and after indexing to minimize the temporal
footprint of the (re)indexing operation.
+Available since public-inbox 1.4.0.
+
=item --reindex
Forces a re-index of all messages in the inbox.
L<public-inbox-compact(1)> afterwards is recommended to
release free space.
-This does not touch the NNTP article number database or
-affect threading.
+public-inbox protects writes to various indices with
+L<flock(2)>, so it is safe to reindex (and rethread) while
+L<public-inbox-watch(1)>, L<public-inbox-mda(1)> or
+L<public-inbox-learn(1)> run.
+
+This does not touch the NNTP article number database.
+It does not affect threading unless C<--rethread> is
+used.
+
+=item --rethread
+
+Regenerate internal THREADID and message thread associations
+when reindexing.
+
+This fixes some bugs in older versions of public-inbox. While
+it is possible to use this without C<--reindex>, it makes little
+sense to do so.
+
+Available in public-inbox 1.6.0 (PENDING).
=item --prune
L<public-inbox-edit(1)> or L<public-inbox-purge(1)> to ensure data
is expunged from mirrors.
+Available since public-inbox 1.2.0.
+
=item --max-size SIZE
Sets or overrides L</publicinbox.indexMaxSize> on a
per-invocation basis. See L</publicinbox.indexMaxSize>
below.
+Available since public-inbox 1.5.0.
+
+=item --batch-size SIZE
+
+Sets or overrides L</publicinbox.indexBatchSize> on a
+per-invocation basis. See L</publicinbox.indexBatchSize>
+below.
+
+Available in public-inbox 1.6.0 (PENDING).
+
=back
=head1 FILES
messages larger than one megabyte.
This is useful for avoiding memory exhaustion in mirrors.
+This option is only available in public-inbox 1.5 or later.
Default: none
+=item publicinbox.indexBatchSize
+
+Flushes changes to the filesystem and releases locks after
+indexing the given number of bytes. The default value of C<1m>
+(one megabyte) is low to minimize memory use and reduce
+contention with parallel invocations of L<public-inbox-mda(1)>,
+L<public-inbox-learn(1)>, and L<public-inbox-watch(1)>.
+
+Increase this value on powerful systems to improve throughput at
+the expense of memory use. The reduction of lock granularity
+may not be noticeable on fast systems.
+
+This option is available in public-inbox 1.6 or later.
+public-inbox 1.5 and earlier used the current default, C<1m>.
+
+For L<public-inbox-v2-format(5)> inboxes, this value is
+multiplied by the number of Xapian shards. Thus a typical v2
+inbox with 3 shards will flush every 3 megabytes by default.
+
+Default: 1m (one megabyte)
+
=back
=head1 ENVIRONMENT
disk. This environment is handled directly by Xapian, refer to
Xapian API documentation for more details.
-Default: our indexing code flushes every megabyte of mail seen
-to keep memory usage low. Setting this environment variable to
-any positive value will switch to a document count-based
-threshold in Xapian.
+For public-inbox 1.6 and later, use C<publicinbox.indexBatchSize>
+instead. Setting C<XAPIAN_FLUSH_THRESHOLD> for a large C<--reindex>
+may cause L<public-inbox-mda(1)>, L<public-inbox-learn(1)> and
+L<public-inbox-watch(1)> tasks to wait long periods of time
+during C<--reindex>.
+
+Default: none, uses C<publicinbox.indexBatchSize>
=back