]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/ExtSearch.pm
get rid of unnecessary bytes::length usage
[public-inbox.git] / lib / PublicInbox / ExtSearch.pm
index 7c9586a6b65b66cd0443228c21ea17318423053e..0b480c7ef5bb44886d2c25256a221644e04acbbf 100644 (file)
@@ -1,4 +1,4 @@
-# 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.
@@ -16,12 +16,13 @@ use DBI qw(:sql_types); # SQL_BLOB
 use parent qw(PublicInbox::Search);
 
 sub new {
-       my (undef, $topdir) = @_;
+       my ($class, $topdir) = @_;
        bless {
                topdir => $topdir,
+               -primary_address => 'unknown@example.com',
                # xpfx => 'ei15'
                xpfx => "$topdir/ei".PublicInbox::Search::SCHEMA_VERSION
-       }, __PACKAGE__;
+       }, $class;
 }
 
 sub misc {
@@ -29,12 +30,6 @@ sub misc {
        $self->{misc} //= PublicInbox::MiscSearch->new("$self->{xpfx}/misc");
 }
 
-# overrides PublicInbox::Search::_xdb
-sub _xdb {
-       my ($self) = @_;
-       $self->xdb_sharded;
-}
-
 # same as per-inbox ->over, for now...
 sub over {
        my ($self) = @_;
@@ -113,10 +108,10 @@ sub description {
 
 sub cloneurl { [] } # TODO
 
-sub base_url { 'https://example.com/TODO/' }
 sub nntp_url { [] }
 
 no warnings 'once';
+*base_url = \&PublicInbox::Inbox::base_url;
 *smsg_eml = \&PublicInbox::Inbox::smsg_eml;
 *smsg_by_mid = \&PublicInbox::Inbox::smsg_by_mid;
 *msg_by_mid = \&PublicInbox::Inbox::msg_by_mid;