From 7bedf475e4b043870b638922a4d6ab1bd469a50b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Sep 2015 08:55:18 +0000 Subject: search: reduce redundant doc data Redundant document data increases our database size, pull the smsg->mid off the unique term, the smsg->ts off the value, and only generate the formatted display date off smsg->ts. --- lib/PublicInbox/Search.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Search.pm') diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index d3faaebb..b7b215f9 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -4,8 +4,9 @@ package PublicInbox::Search; use strict; use warnings; -use PublicInbox::SearchMsg; +use constant TS => 0; use Search::Xapian qw/:standard/; +use PublicInbox::SearchMsg; use Email::MIME; use PublicInbox::MID qw/mid_clean mid_compress/; @@ -15,7 +16,6 @@ our $REPLY_RE = qr/^re:\s+/i; our $LANG = 'english'; use constant { - TS => 0, # SCHEMA_VERSION history # 0 - initial # 1 - subject_path is lower-cased @@ -25,7 +25,8 @@ use constant { # 5 - subject_path drops trailing '.' # 6 - preserve References: order in document data # 7 - remove references and inreplyto terms - SCHEMA_VERSION => 7, + # 8 - remove redundant/unneeded document data + SCHEMA_VERSION => 8, QP_FLAGS => FLAG_PHRASE|FLAG_BOOLEAN|FLAG_LOVEHATE|FLAG_WILDCARD, }; -- cgit v1.2.3-24-ge0c7