]> Sergey Matveev's repositories - public-inbox.git/commitdiff
extsearch: rename -eindex to -extindex
authorEric Wong <e@80x24.org>
Sat, 7 Nov 2020 10:56:51 +0000 (10:56 +0000)
committerEric Wong <e@80x24.org>
Sun, 8 Nov 2020 10:18:13 +0000 (10:18 +0000)
Upon "eindex" rhymes with "reindex", which could be confusing;
so name the command and config prefix to use "extindex" which
is hopefully less confusing.

MANIFEST
lib/PublicInbox/Config.pm
script/public-inbox-extindex [moved from script/public-inbox-eindex with 93% similarity]
t/extsearch.t

index 10561cd23258e84d3b48523a3ec38a2a4455e4de..fc79a134fa5d5f0cae2a4e648cf203a993ff6bf9 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -225,7 +225,7 @@ sa_config/user/.spamassassin/user_prefs
 script/public-inbox-compact
 script/public-inbox-convert
 script/public-inbox-edit
-script/public-inbox-eindex
+script/public-inbox-extindex
 script/public-inbox-httpd
 script/public-inbox-imapd
 script/public-inbox-index
index d425cc9b162d0d4ab7b3dcd76b7fa3f3a03c863c..d2010f7af8f629b896be5c19030ecfc499220334 100644 (file)
@@ -91,7 +91,7 @@ sub lookup_name ($$) {
 
 sub lookup_ei {
        my ($self, $name) = @_;
-       $self->{-ei_by_name}->{$name} //= _fill_ei($self, "eindex.$name");
+       $self->{-ei_by_name}->{$name} //= _fill_ei($self, "extindex.$name");
 }
 
 sub each_inbox {
similarity index 93%
rename from script/public-inbox-eindex
rename to script/public-inbox-extindex
index c26edb9310f7fbd397ad4aa56029322dda82b4a1..a58f35cabfd9eac690e00ef7a1bd2f8b6a84f65a 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use v5.10.1;
 use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev);
 my $help = <<EOF; # the following should fit w/o scrolling in 80x24 term:
-usage: public-inbox-eindex [options] EINDEX_DIR [INBOX_DIR]
+usage: public-inbox-extindex [options] EXTINDEX_DIR [INBOX_DIR]
 
   Create and update external (detached) search indices
 
@@ -19,7 +19,7 @@ usage: public-inbox-eindex [options] EINDEX_DIR [INBOX_DIR]
   --verbose | -v      increase verbosity (may be repeated)
 
 BYTES may use `k', `m', and `g' suffixes (e.g. `10m' for 10 megabytes)
-See public-inbox-eindex(1) man page for full documentation.
+See public-inbox-extindex(1) man page for full documentation.
 EOF
 my $opt = { quiet => -1, compact => 0, max_size => undef, fsync => 1 };
 GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i
index 8d2c1507d7ce22a905b0e981eaecbf3d1cd9b38d..8792fd9e96911a1f273f5372fed3289d5445560c 100644 (file)
@@ -33,7 +33,7 @@ seek($fh, 0, SEEK_SET) or BAIL_OUT $!;
 run_script(['-mda', '--no-precheck'], $env, { 0 => $fh }) or BAIL_OUT '-mda';
 run_script(['-index', "$home/v1test"]) or BAIL_OUT "index $?";
 
-ok(run_script([qw(-eindex --all), "$home/eindex"]), 'eindex init');
+ok(run_script([qw(-extindex --all), "$home/eindex"]), 'extindex init');
 
 my $es = PublicInbox::ExtSearch->new("$home/eindex");
 {
@@ -53,8 +53,8 @@ my $es = PublicInbox::ExtSearch->new("$home/eindex");
        my $env = { MAIL_EDITOR => "$^X -i -p -e 's/test message/BEST MSG/'" };
        my $cmd = [ qw(-edit -Ft/utf8.eml), "$home/v2test" ];
        ok(run_script($cmd, $env, $opt), '-edit');
-       ok(run_script([qw(-eindex --all), "$home/eindex"], undef, $opt),
-               'eindex again');
+       ok(run_script([qw(-extindex --all), "$home/eindex"], undef, $opt),
+               'extindex again');
        like($err, qr/discontiguous range/, 'warned about discontiguous range');
        my $msg1 = $es->over->get_art(1) or BAIL_OUT 'msg1 missing';
        my $msg2 = $es->over->get_art(2) or BAIL_OUT 'msg2 missing';