]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
extmsg: use Xapian only for partial matches
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index 4dc81352f535568d7673cabb8d6ad6fff5cb859b..aeb363e03d1d57a7ccd3cc7c1ae408cf98d91a05 100644 (file)
@@ -331,6 +331,13 @@ sub add_message {
 
                foreach my $mid (@$mids) {
                        $tg->index_text($mid, 1, 'XM');
+
+                       # because too many Message-IDs are prefixed with
+                       # "Pine.LNX."...
+                       if ($mid =~ /\w{12,}/) {
+                               my @long = ($mid =~ /(\w{3,}+)/g);
+                               $tg->index_text(join(' ', @long), 1, 'XM');
+                       }
                        $tg->increase_termpos;
                }
                $smsg->{to} = $smsg->{cc} = '';