about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-12-22 22:17:38 +0000
committerEric Wong <e@80x24.org>2019-12-24 03:47:04 +0000
commit9484944697a1bf76d00d84d081e6a7d633074336 (patch)
tree933b58c83b9b955ae8a25bf188c8c2b51ee272fe /lib/PublicInbox/SearchIdx.pm
parenta09f678d8254064af7ca6dcfb3c3f84b5ae37b51 (diff)
downloadpublic-inbox-9484944697a1bf76d00d84d081e6a7d633074336.tar.gz
searchidx: call "++" on PostingIterator instead of "->inc"
The "++" is not yet available in the SWIG-based "Xapian.pm" Perl
bindings, so use "++" where it's supported in both the XS
(Search::Xapian) and SWIG-based Xapian binding.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r--lib/PublicInbox/SearchIdx.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 926fac80..b56fd0ee 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -384,7 +384,7 @@ sub batch_do {
                 my ($head, $tail) = $self->find_doc_ids($termval);
                 return if $head == $tail;
                 my @ids;
-                for (; $head != $tail && @ids < $batch_size; $head->inc) {
+                for (; $head != $tail && @ids < $batch_size; $head++) {
                         push @ids, $head->get_docid;
                 }
                 $cb->(\@ids);
@@ -439,7 +439,7 @@ sub remove_by_oid {
         # there is only ONE element in @delete unless we
         # have bugs in our v2writable deduplication check
         my @delete;
-        for (; $head != $tail; $head->inc) {
+        for (; $head != $tail; $head++) {
                 my $docid = $head->get_docid;
                 my $doc = $db->get_document($docid);
                 my $smsg = PublicInbox::SearchMsg->wrap($mid);