]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidx: index lower-case List-Id value
authorEric Wong <e@80x24.org>
Mon, 28 Sep 2020 05:15:19 +0000 (05:15 +0000)
committerEric Wong <e@80x24.org>
Tue, 29 Sep 2020 03:00:25 +0000 (03:00 +0000)
We don't want a List-Id value being confused with a Xapian
term prefix, here.

Followup-to: 8b06cda3a3af3f0e ("mda: match List-Id insensitively")
lib/PublicInbox/SearchIdx.pm

index 803494f508291baffe932f0671e3adabb76f0b20..2c5c815f605755da79e5d551b088331b6bee5e86 100644 (file)
@@ -340,7 +340,7 @@ sub index_ids ($$$$) {
        $doc->add_boolean_term('Q' . $_) for @$mids;
        for my $l ($hdr->header_raw('List-Id')) {
                $l =~ /<([^>]+)>/ or next;
-               my $lid = $1;
+               my $lid = lc $1;
                $doc->add_boolean_term('G' . $lid);
                index_text($self, $lid, 1, 'XL'); # probabilistic
        }