about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchMsg.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-10-03 19:43:30 +0000
committerEric Wong <e@80x24.org>2017-10-03 20:00:41 +0000
commit38c481a5438593cff686709493a70b8a6b3033d1 (patch)
treec288246c52611759bfddcbb4bb371a3bd1bb789e /lib/PublicInbox/SearchMsg.pm
parent2aa29ee6a35f5be2d76c39ccc50bf7a34075e2bd (diff)
downloadpublic-inbox-38c481a5438593cff686709493a70b8a6b3033d1.tar.gz
Since we attempt to fill in threads by Subject, our thread
skeletons can cross actual thread IDs, leading to the
possibility of false ghosts showing up in the skeleton.
Try to fill in the ghosts as well as possible by performing
a message lookup.
Diffstat (limited to 'lib/PublicInbox/SearchMsg.pm')
-rw-r--r--lib/PublicInbox/SearchMsg.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm
index a19d45db..84e2ad51 100644
--- a/lib/PublicInbox/SearchMsg.pm
+++ b/lib/PublicInbox/SearchMsg.pm
@@ -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;