-# Copyright (C) 2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# Read-only external (detached) index for cross inbox search.
use parent qw(PublicInbox::Search);
sub new {
- my (undef, $topdir) = @_;
+ my ($class, $topdir) = @_;
bless {
topdir => $topdir,
# xpfx => 'ei15'
xpfx => "$topdir/ei".PublicInbox::Search::SCHEMA_VERSION
- }, __PACKAGE__;
+ }, $class;
}
sub misc {
$self->{misc} //= PublicInbox::MiscSearch->new("$self->{xpfx}/misc");
}
-sub search { $_[0] } # self
-
-# overrides PublicInbox::Search::_xdb
-sub _xdb {
- my ($self) = @_;
- $self->xdb_sharded;
-}
-
# same as per-inbox ->over, for now...
sub over {
my ($self) = @_;
*recent = \&PublicInbox::Inbox::recent;
*max_git_epoch = *nntp_usable = *msg_by_path = \&mm; # undef
-*isrch = *search;
+*isrch = *search = \&PublicInbox::Search::reopen;
1;