user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Cc: Eric Wong <e@80x24.org>
Subject: [RFC 11/11] SearchMsg: ensure metadata for ghost messages mid
Date: Sun, 16 Aug 2015 08:37:59 +0000	[thread overview]
Message-ID: <1439714279-21923-12-git-send-email-e@80x24.org> (raw)
In-Reply-To: <1439714279-21923-1-git-send-email-e@80x24.org>

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


  parent reply	other threads:[~2015-08-16  8:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-16  8:37 [RFC 0/11] work-in-progress search branch updated Eric Wong
2015-08-16  8:37 ` [RFC 01/11] search: implement index_sync to fixup indexer Eric Wong
2015-08-16  8:37 ` [RFC 02/11] extract redundant Message-ID handling code Eric Wong
2015-08-16  8:37 ` [RFC 03/11] search: make search results more OO Eric Wong
2015-08-16  8:37 ` [RFC 04/11] view: display replies in per-message view Eric Wong
2015-08-16  8:37 ` [RFC 05/11] thread: common sorting code Eric Wong
2015-08-16  8:37 ` [RFC 06/11] view: reply threading adjustment Eric Wong
2015-08-16  8:37 ` [RFC 07/11] view: hoist out index_walk function Eric Wong
2015-08-16  9:23   ` Eric Wong
2015-08-16  8:37 ` [RFC 08/11] www: /t/$MESSAGE_ID.html for threads Eric Wong
2015-08-16  8:37 ` [RFC 09/11] search: remove unnecessary xpfx export Eric Wong
2015-08-16  8:37 ` [RFC 10/11] implement /s/$SUBJECT_PATH.html lookups Eric Wong
2015-08-16  8:37 ` Eric Wong [this message]
2015-08-16  8:55 ` [RFC 12/11] view: deduplicate common code for loading search results Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439714279-21923-12-git-send-email-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).