From: Eric Wong Date: Tue, 9 Aug 2016 23:59:10 +0000 (+0000) Subject: searchidx: allow searching Message-IDs in free-form text X-Git-Tag: v1.0.0~242 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c357e8699d99e20e1033e13bd1e2faa9856fb456;p=public-inbox.git searchidx: allow searching Message-IDs in free-form text It is not unheard of for users to attempt finding messages by entering Message-IDs into the "Search" box instead of using the existing URL structure. So make it possible for them. Fwiw, I've definitely encountered users who enter entire URLs into generic search engines. --- diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 0582526e..a18a2148 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -169,6 +169,7 @@ sub add_message { }); link_message($self, $smsg, $old_tid); + $tg->index_text($mid, 1); $doc->set_data($smsg->to_doc_data($blob)); if (defined $doc_id) { $db->replace_document($doc_id, $doc);