diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Search.pm | 3 | ||||
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index ceee39af..0c056772 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -69,6 +69,7 @@ my %prob_prefix = ( tcf => 'XTO XCC A', b => 'XNQ XQUOT', bs => 'XNQ XQUOT S', + n => 'XFN', # n.b.: leaving out "a:" alias for "tcf:" even though # mairix supports it. It is only mentioned in passing in mairix(1) @@ -77,7 +78,7 @@ my %prob_prefix = ( nq => 'XNQ', # default: - '' => 'XMID S A XNQ XQUOT', + '' => 'XMID S A XNQ XQUOT XFN', ); # not documenting m: and mid: for now, the using the URLs works w/o Xapian diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index fb68f4b1..23aef9f3 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -181,6 +181,10 @@ sub add_message { msg_iter($mime, sub { my ($part, $depth, @idx) = @{$_[0]}; my $ct = $part->content_type || 'text/plain'; + my $fn = $part->filename; + if (defined $fn && $fn ne '') { + $tg->index_text($fn, 1, 'XFN'); + } return if $ct =~ m!\btext/x?html\b!i; |