diff options
author | Eric Wong <e@yhbt.net> | 2020-01-26 01:17:43 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-27 02:58:07 +0000 |
commit | 7c5ac90b309bbe76468055e8a9289664ef2dfe37 (patch) | |
tree | 3756cc39f302fd42116bd3da88121105e3a29eab /lib/PublicInbox/Search.pm | |
parent | 227a1d886672767e37cc86a3432952c14eb8a143 (diff) | |
download | public-inbox-7c5ac90b309bbe76468055e8a9289664ef2dfe37.tar.gz |
search: {version} => {ibx_ver}
We don't confuse human readers with the Xapian schema version. We also want to make it obvious this is the version of the inbox we're indexing, these are Search or SearchIdx objects, not Inbox objects.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r-- | lib/PublicInbox/Search.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 5e820594..a4491ca1 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -148,7 +148,7 @@ chomp @HELP; sub xdir ($;$) { my ($self, $rdonly) = @_; - if ($self->{version} == 1) { + if ($self->{ibx_ver} == 1) { "$self->{inboxdir}/public-inbox/xapian" . SCHEMA_VERSION; } else { my $dir = "$self->{inboxdir}/xap" . SCHEMA_VERSION; @@ -165,7 +165,7 @@ sub _xdb ($) { my $dir = xdir($self, 1); my ($xdb, $slow_phrase); my $qpf = \($self->{qp_flags} ||= $QP_FLAGS); - if ($self->{version} >= 2) { + if ($self->{ibx_ver} >= 2) { foreach my $shard (<$dir/*>) { -d $shard && $shard =~ m!/[0-9]+\z! or next; my $sub = $X{Database}->new($shard); @@ -198,7 +198,7 @@ sub new { my $self = bless { inboxdir => $ibx->{inboxdir}, altid => $ibx->{altid}, - version => $ibx->version, + ibx_ver => $ibx->version, }, $class; my $dir = xdir($self, 1); $self->{over_ro} = PublicInbox::Over->new("$dir/over.sqlite3"); |