-no warnings 'once';
-local $PublicInbox::SearchIdx::BATCH_BYTES = $bs if defined($bs);
-use warnings 'once';
-
-# out-of-the-box builds of Xapian 1.4.x are still limited to 32-bit
-# https://getting-started-with-xapian.readthedocs.io/en/latest/concepts/indexing/limitations.html
-local $ENV{XAPIAN_FLUSH_THRESHOLD} ||= '4294967295' if defined($bs);
-
-my $s = $opt->{sequentialshard} //
- $cfg->{lc('publicInbox.indexSequentialShard')};
-if (defined $s) {
- my $v = $cfg->git_bool($s);
- defined($v) or
- die "`publicInbox.indexSequentialShard=$s' not boolean\n";
- $opt->{sequentialshard} = $v;
+for my $ei_name (@$update_extindex) {
+ my $es = $cfg->lookup_ei($ei_name);
+ my $topdir;
+ if (!$es && -d $ei_name) { # allow dirname or config section name
+ $topdir = $ei_name;
+ } elsif ($es) {
+ $topdir = $es->{topdir};
+ } else {
+ die "extindex `$ei_name' not configured or found\n";
+ }
+ my $o = { %$opt };
+ delete $o->{indexlevel} if ($o->{indexlevel}//'') eq 'basic';
+ $eidx_seen{$topdir} //=
+ push(@eidx, PublicInbox::ExtSearchIdx->new($topdir, $o));