From 43fd7e7bda1b8eeb32cf43f6fd89568a938aedf5 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Sat, 3 Mar 2018 17:26:16 +0000 Subject: searchidx: use add_boolean_term for internal terms Aside from the Message-Id ('Q'), these terms do not appear in content and thus have no business contributing to the Xapian document length. Thanks-to Olly Betts for the tip on xapian-discuss <20180228004400.GU12724@survex.com> --- lib/PublicInbox/SearchMsg.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/SearchMsg.pm') diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm index a5565345..93e6fd8b 100644 --- a/lib/PublicInbox/SearchMsg.pm +++ b/lib/PublicInbox/SearchMsg.pm @@ -14,7 +14,7 @@ use PublicInbox::Address; sub new { my ($class, $mime) = @_; my $doc = Search::Xapian::Document->new; - $doc->add_term('T' . 'mail'); + $doc->add_boolean_term('T' . 'mail'); bless { type => 'mail', doc => $doc, mime => $mime }, $class; } -- cgit v1.2.3-24-ge0c7