]> Sergey Matveev's repositories - public-inbox.git/commitdiff
v2writable: compatibility with SWIG Xapian binding
authorEric Wong <e@yhbt.net>
Tue, 25 Aug 2020 20:26:24 +0000 (20:26 +0000)
committerEric Wong <e@yhbt.net>
Wed, 26 Aug 2020 06:11:06 +0000 (06:11 +0000)
The SWIG binding won't auto-convert IV/UV to PV like the XS
Search::Xapian binding would, so workaround that shortcoming
for now.

Fixes: a367ec1b15a2458 ("mbox: disable "&t" on existing Xapian until full reindex")
lib/PublicInbox/V2Writable.pm

index 3d6f19cb9cf0fb1352f18b9b27404d12b50d757a..c926446c87ef0697057fdf1973228891ce2a8194 100644 (file)
@@ -1346,7 +1346,7 @@ sub index_sync {
                my $s0 = PublicInbox::SearchIdx->new($self->{ibx}, 0, 0);
                if (my $xdb = $s0->idx_acquire) {
                        my $n = $xdb->get_metadata('has_threadid');
-                       $xdb->set_metadata('has_threadid', 1) if $n ne '1';
+                       $xdb->set_metadata('has_threadid', '1') if $n ne '1';
                }
                $s0->idx_release;
                $self->lock_release;