]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchMsg.pm
update copyrights for 2018
[public-inbox.git] / lib / PublicInbox / SearchMsg.pm
index a19d45db8cc87531753eb0bc032bc38253e358d1..afba8b1a814c92c978c37c1ec3f44ea5b6a443e9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016 all contributors <meta@public-inbox.org>
+# Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # based on notmuch, but with no concept of folders, files or flags
 #
@@ -29,6 +29,22 @@ sub get_val ($$) {
        Search::Xapian::sortable_unserialise($doc->get_value($col));
 }
 
+sub load_expand {
+       my ($self) = @_;
+       my $doc = $self->{doc};
+       my $data = $doc->get_data or return;
+       $self->{ts} = get_val($doc, &PublicInbox::Search::TS);
+       utf8::decode($data);
+       my ($subj, $from, $refs, $to, $cc, $blob) = split(/\n/, $data);
+       $self->{subject} = $subj;
+       $self->{from} = $from;
+       $self->{references} = $refs;
+       $self->{to} = $to;
+       $self->{cc} = $cc;
+       $self->{blob} = $blob;
+       $self;
+}
+
 sub load_doc {
        my ($class, $doc) = @_;
        my $data = $doc->get_data or return;