]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
searchidx: revert default BATCH_BYTES to 1_000_000
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index 2239c90209579e42c590c8e0df113ab53617879b..7026fc4cbe76268aa443c5ee573f2860d4dfe02d 100644 (file)
@@ -22,7 +22,7 @@ require PublicInbox::Git;
 use Compress::Zlib qw(compress);
 
 use constant {
-       BATCH_BYTES => 10_000_000,
+       BATCH_BYTES => 1_000_000,
        DEBUG => !!$ENV{DEBUG},
 };
 
@@ -295,6 +295,7 @@ sub add_message {
                        my $fn = $part->filename;
                        if (defined $fn && $fn ne '') {
                                $tg->index_text($fn, 1, 'XFN');
+                               $tg->increase_termpos;
                        }
 
                        return if $ct =~ m!\btext/x?html\b!i;
@@ -330,6 +331,7 @@ sub add_message {
 
                foreach my $mid (@$mids) {
                        $tg->index_text($mid, 1, 'XM');
+                       $tg->increase_termpos;
                }
                $smsg->{to} = $smsg->{cc} = '';
                PublicInbox::OverIdx::parse_references($smsg, $mid0, $mids);