From ef2c4d1767cc9fe63a1b6a44a2c8b423063bee61 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 24 Nov 2025 20:04:34 +0000 Subject: [PATCH] searchidx: fix --split-shards with SWIG Xapian.pm SWIG Xapian.pm is stricter about types and won't automatically stringify integer scalars whereas the old XS Search::Xapian supported more Perl-like behavior. So we'll stringify manually to appease the SWIG binding. Reported-by: Konstantin Ryabitsev Tested-by: Konstantin Ryabitsev --- lib/PublicInbox/SearchIdx.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 13bf4544c..a705b6acd 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -255,7 +255,7 @@ EOM $self->{-opt}->{'split-at'} = $cur; } else { $cur ||= $new // $SHARD_SPLIT_AT; - $xdb->set_metadata('split-at', $cur); + $xdb->set_metadata('split-at', "$cur"); $self->{-do_join_splits} = 1; } $self->{-doc_max} = $xdb->get_lastdocid || $cur; -- 2.47.3