X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FExtSearch.pm;h=bd301158a6b0a4163cb58073384bf034a5238dda;hb=4363e6037fa7d597294186f60373e9de8e1b3d74;hp=410ae95854f6a2a4d2e572c26e8aceaa19ddd55a;hpb=6cdb84af2c75b3c66a35c8c4973f455da15dd0a4;p=public-inbox.git
diff --git a/lib/PublicInbox/ExtSearch.pm b/lib/PublicInbox/ExtSearch.pm
index 410ae958..bd301158 100644
--- a/lib/PublicInbox/ExtSearch.pm
+++ b/lib/PublicInbox/ExtSearch.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 all contributors
+# Copyright (C) 2020-2021 all contributors
# License: AGPL-3.0+
# Read-only external (detached) index for cross inbox search.
@@ -9,7 +9,6 @@ use strict;
use v5.10.1;
use PublicInbox::Over;
use PublicInbox::Inbox;
-use File::Spec ();
use PublicInbox::MiscSearch;
use DBI qw(:sql_types); # SQL_BLOB
@@ -18,9 +17,9 @@ use parent qw(PublicInbox::Search);
sub new {
my ($class, $topdir) = @_;
- $topdir = File::Spec->canonpath($topdir);
bless {
topdir => $topdir,
+ -primary_address => 'unknown@example.com',
# xpfx => 'ei15'
xpfx => "$topdir/ei".PublicInbox::Search::SCHEMA_VERSION
}, $class;
@@ -31,14 +30,6 @@ 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) = @_;
@@ -115,12 +106,8 @@ sub description {
'$EXTINDEX_DIR/description missing';
}
-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;
@@ -128,6 +115,6 @@ no warnings 'once';
*recent = \&PublicInbox::Inbox::recent;
*max_git_epoch = *nntp_usable = *msg_by_path = \&mm; # undef
-*isrch = *search;
+*isrch = *search = \&PublicInbox::Search::reopen;
1;