about summary refs log tree commit homepage
path: root/t/xcpdb-reshard.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-12-22 22:17:39 +0000
committerEric Wong <e@80x24.org>2019-12-24 03:48:12 +0000
commitcd8dd7b08fddc7c2b5f218c3fcaa5dca5f9ad945 (patch)
tree0989e4981be20e2408dda31314da019bd1841647 /t/xcpdb-reshard.t
parent9484944697a1bf76d00d84d081e6a7d633074336 (diff)
downloadpublic-inbox-cd8dd7b08fddc7c2b5f218c3fcaa5dca5f9ad945.tar.gz
Xapian upstream is slowly phasing out the XS-based Search::Xapian
in favor of the SWIG-generated "Xapian" package.  While Debian and
both FreeBSD have Search::Xapian, OpenBSD only includes the "Xapian"
binding.

More information about the status of the "Xapian" Perl module here:
https://trac.xapian.org/ticket/523
Diffstat (limited to 't/xcpdb-reshard.t')
-rw-r--r--t/xcpdb-reshard.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t
index 1eae234d..2a0aeb45 100644
--- a/t/xcpdb-reshard.t
+++ b/t/xcpdb-reshard.t
@@ -8,6 +8,7 @@ require_mods(qw(DBD::SQLite Search::Xapian));
 require_git('2.6');
 use PublicInbox::MIME;
 use PublicInbox::InboxWritable;
+use PublicInbox::Search;
 
 my $mime = PublicInbox::MIME->create(
         header => [
@@ -61,8 +62,9 @@ for my $R (qw(2 4 1 3 3)) {
         # ensure docids in Xapian match NNTP article numbers
         my $tot = 0;
         my %tmp = %nums;
+        my $XapianDatabase = $PublicInbox::Search::X{Database};
         foreach my $d (@new_shards) {
-                my $xdb = Search::Xapian::Database->new($d);
+                my $xdb = $XapianDatabase->new($d);
                 $tot += $xdb->get_doccount;
                 my $it = $xdb->postlist_begin('');
                 my $end = $xdb->postlist_end('');