From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 5C42A1FD99; Wed, 10 Aug 2016 23:23:58 +0000 (UTC) Date: Wed, 10 Aug 2016 23:23:58 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] searchidx: allow searching Message-IDs in free-form text Message-ID: <20160810232358.GA29130@whir> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline List-Id: (Bcc-ing the user who brought this to my attention privately) I will be reindexing the search index behind http://czquwvybam4bgbro.onion/git/ shortly (along with some other search-related changes queued up). The rest of the stuff will be reindex later tonight if that goes well (the reindexing code is a bit new and not-well-tested) -----8<------- Subject: [PATCH] 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(+) diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 0582526..a18a214 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); -- https://public-inbox.org/meta/