about summary refs log tree commit homepage
path: root/lib/PublicInbox/Search.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2024-04-25 21:31:46 +0000
committerEric Wong <e@80x24.org>2024-04-28 17:05:29 +0000
commitcccff5cbaf8e9800dbcb67dd497586bdb0a8521e (patch)
treeda3292d5a6d59509fbac435479620fd44d2aee1b /lib/PublicInbox/Search.pm
parentbad65d1197b8ee45a28e8bb7c894912145012fb5 (diff)
downloadpublic-inbox-cccff5cbaf8e9800dbcb67dd497586bdb0a8521e.tar.gz
Xapian helper processes are disabled by default once again.
However, they can be enabled via the new `-X INTEGER' parameter.
One big positive is the Xapian helpers being spawned by the
top-level daemon means they can be shared freely across all
workers for improved load balancing and memory reduction.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r--lib/PublicInbox/Search.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index b7732ae5..4adef366 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -11,7 +11,7 @@ our @EXPORT_OK = qw(retry_reopen int_val get_pct xap_terms);
 use List::Util qw(max);
 use POSIX qw(strftime);
 use Carp ();
-our $XHC;
+our $XHC = 0; # defined but false
 
 # values for searching, changing the numeric value breaks
 # compatibility with old indices (so don't change them it)
@@ -57,7 +57,7 @@ use constant {
 };
 
 use PublicInbox::Smsg;
-use PublicInbox::Over;
+eval { require PublicInbox::Over };
 our $QP_FLAGS;
 our %X = map { $_ => 0 } qw(BoolWeight Database Enquire QueryParser Stem Query);
 our $Xap; # 'Xapian' or 'Search::Xapian'
@@ -428,9 +428,9 @@ sub mset {
         do_enquire($self, $qry, $opt, TS);
 }
 
-sub xhc_start_maybe () {
+sub xhc_start_maybe (@) {
         require PublicInbox::XapClient;
-        my $xhc = PublicInbox::XapClient::start_helper();
+        my $xhc = PublicInbox::XapClient::start_helper(@_);
         require PublicInbox::XhcMset if $xhc;
         $xhc;
 }