X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FSearchMsg.pm;h=afba8b1a814c92c978c37c1ec3f44ea5b6a443e9;hb=3d41aa23f35501ca92aab8aa42980fa73f7fa74f;hp=a19d45db8cc87531753eb0bc032bc38253e358d1;hpb=7eeadcb62729b0efbcb53cd9b7b181897c92cf9a;p=public-inbox.git
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm
index a19d45db..afba8b1a 100644
--- a/lib/PublicInbox/SearchMsg.pm
+++ b/lib/PublicInbox/SearchMsg.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016 all contributors
+# Copyright (C) 2015-2018 all contributors
# License: AGPL-3.0+
# 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;