summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
227a1d8)
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.
sub xdir ($;$) {
my ($self, $rdonly) = @_;
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;
"$self->{inboxdir}/public-inbox/xapian" . SCHEMA_VERSION;
} else {
my $dir = "$self->{inboxdir}/xap" . SCHEMA_VERSION;
my $dir = xdir($self, 1);
my ($xdb, $slow_phrase);
my $qpf = \($self->{qp_flags} ||= $QP_FLAGS);
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);
foreach my $shard (<$dir/*>) {
-d $shard && $shard =~ m!/[0-9]+\z! or next;
my $sub = $X{Database}->new($shard);
my $self = bless {
inboxdir => $ibx->{inboxdir},
altid => $ibx->{altid},
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");
}, $class;
my $dir = xdir($self, 1);
$self->{over_ro} = PublicInbox::Over->new("$dir/over.sqlite3");
-inbox => $ibx,
git => $ibx->git,
-altid => $altid,
-inbox => $ibx,
git => $ibx->git,
-altid => $altid,
indexlevel => $indexlevel,
}, $class;
$ibx->umask_prepare;
indexlevel => $indexlevel,
}, $class;
$ibx->umask_prepare;
sub _msgmap_init ($) {
my ($self) = @_;
sub _msgmap_init ($) {
my ($self) = @_;
- die "BUG: _msgmap_init is only for v1\n" if $self->{version} != 1;
+ die "BUG: _msgmap_init is only for v1\n" if $self->{ibx_ver} != 1;
$self->{mm} //= eval {
require PublicInbox::Msgmap;
PublicInbox::Msgmap->new($self->{inboxdir}, 1);
$self->{mm} //= eval {
require PublicInbox::Msgmap;
PublicInbox::Msgmap->new($self->{inboxdir}, 1);