]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchMsg.pm
search: try to fill in ghosts when generating thread skeleton
[public-inbox.git] / lib / PublicInbox / SearchMsg.pm
index a19d45db8cc87531753eb0bc032bc38253e358d1..84e2ad519e55986bc910d26ee67702a71fa628bb 100644 (file)
@@ -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;