From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9A77D1F827; Sun, 16 Aug 2015 08:38:06 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Cc: Eric Wong Subject: [RFC 11/11] SearchMsg: ensure metadata for ghost messages mid Date: Sun, 16 Aug 2015 08:37:59 +0000 Message-Id: <1439714279-21923-12-git-send-email-e@80x24.org> In-Reply-To: <1439714279-21923-1-git-send-email-e@80x24.org> References: <1439714279-21923-1-git-send-email-e@80x24.org> List-Id: 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... --- lib/PublicInbox/SearchMsg.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm index 550521a..14a62eb 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; } } -- EW