about summary refs log tree commit homepage
path: root/lib/PublicInbox/Search.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-03 05:55:26 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-03 06:47:19 +0000
commit5230930a798ef261a68385d9026acb81137d640f (patch)
tree44f334ad64c8de60012b4952dad916a62926d970 /lib/PublicInbox/Search.pm
parent4030525cb228eb3837f5260637bd7a5a861e81e2 (diff)
downloadpublic-inbox-5230930a798ef261a68385d9026acb81137d640f.tar.gz
When indexing diffs, we can avoid indexing the diff parts under
XNQ and instead combine the parts in the read-only search
interface.  This results in better indexing performance and
10-15% smaller Xapian indices.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r--lib/PublicInbox/Search.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index fb7a126a..a1c423c8 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -59,6 +59,7 @@ my %bool_pfx_external = (
         mid => 'Q', # Message-ID (full/exact), this is mostly uniQue
 );
 
+my $non_quoted_body = 'XNQ XDFN XDFA XDFB XDFHH XDFCTX XDFPRE XDFPOST';
 my %prob_prefix = (
         # for mairix compatibility
         s => 'S',
@@ -69,12 +70,12 @@ my %prob_prefix = (
         c => 'XCC',
         tcf => 'XTO XCC A',
         a => 'XTO XCC A',
-        b => 'XNQ XQUOT',
-        bs => 'XNQ XQUOT S',
+        b => $non_quoted_body . ' XQUOT',
+        bs => $non_quoted_body . ' XQUOT S',
         n => 'XFN',
 
         q => 'XQUOT',
-        nq => 'XNQ',
+        nq => $non_quoted_body,
         dfn => 'XDFN',
         dfa => 'XDFA',
         dfb => 'XDFB',
@@ -85,7 +86,7 @@ my %prob_prefix = (
         dfblob => 'XDFPRE XDFPOST',
 
         # default:
-        '' => 'XM S A XNQ XQUOT XFN',
+        '' => 'XM S A XQUOT XFN ' . $non_quoted_body,
 );
 
 # not documenting m: and mid: for now, the using the URLs works w/o Xapian