about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchMsg.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-08-16 08:32:18 +0000
committerEric Wong <e@80x24.org>2015-08-16 08:32:18 +0000
commit5daa5a6a3da3e944c7757b8f3aebedef602f21a4 (patch)
treed8b977e47fbd7da1e8eb4f406c05bf7acac78c39 /lib/PublicInbox/SearchMsg.pm
parenteb5f82b20944d780ac3b2ff9a926c023da9468fd (diff)
downloadpublic-inbox-5daa5a6a3da3e944c7757b8f3aebedef602f21a4.tar.gz
Ghosts have no document data in them.
Perhaps we should just rely on terms for Message-ID
and avoid storing that in the document data...
Diffstat (limited to 'lib/PublicInbox/SearchMsg.pm')
-rw-r--r--lib/PublicInbox/SearchMsg.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm
index 550521aa..14a62eb6 100644
--- a/lib/PublicInbox/SearchMsg.pm
+++ b/lib/PublicInbox/SearchMsg.pm
@@ -152,9 +152,10 @@ sub mid {
         my ($self, $mid) = @_;
 
         if (defined $mid) {
-            $self->{mid} = $mid;
+                $self->{mid} = $mid;
         } else {
-            $self->{mid} ||= $self->_extract_mid;
+                $self->ensure_metadata; # needed for ghosts
+                $self->{mid} ||= $self->_extract_mid;
         }
 }