From c357e8699d99e20e1033e13bd1e2faa9856fb456 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 9 Aug 2016 23:59:10 +0000 Subject: 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. --- lib/PublicInbox/SearchIdx.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/SearchIdx.pm') 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); -- cgit v1.2.3-24-ge0c7