diff options
Diffstat (limited to 'lib/PublicInbox/LeiStore.pm')
-rw-r--r-- | lib/PublicInbox/LeiStore.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index 56f668b8..b5b49efb 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -22,7 +22,12 @@ use PublicInbox::LeiSearch; sub new { my (undef, $dir, $opt) = @_; my $eidx = PublicInbox::ExtSearchIdx->new($dir, $opt); - bless { priv_eidx => $eidx }, __PACKAGE__; + my $self = bless { priv_eidx => $eidx }, __PACKAGE__; + if ($opt->{creat}) { + PublicInbox::SearchIdx::load_xapian_writable(); + eidx_init($self); + } + $self; } sub git { $_[0]->{priv_eidx}->git } # read-only |