X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FSearch.pm;h=25ab8d52718950482847f048631820be4dec98b0;hb=38c481a5438593cff686709493a70b8a6b3033d1;hp=67837f4f77300e6ef76333c623cb07eeca24ea30;hpb=7eeadcb62729b0efbcb53cd9b7b181897c92cf9a;p=public-inbox.git diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 67837f4f..25ab8d52 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -75,6 +75,14 @@ my %prob_prefix = ( q => 'XQUOT', nq => 'XNQ', + dfn => 'XDFN', + dfa => 'XDFA', + dfb => 'XDFB', + dfhh => 'XDFHH', + dfctx => 'XDFCTX', + dfpre => 'XDFPRE', + dfpost => 'XDFPOST', + dfblob => 'XDFPRE XDFPOST', # default: '' => 'XMID S A XNQ XQUOT XFN', @@ -98,12 +106,16 @@ EOF 'a:' => 'match within the To, Cc, and From headers', 'tc:' => 'match within the To and Cc headers', 'bs:' => 'match within the Subject and body', + 'dfn:' => 'match filename from diff', + 'dfa:' => 'match diff removed (-) lines', + 'dfb:' => 'match diff added (+) lines', + 'dfhh:' => 'match diff hunk header context (usually a function name)', + 'dfctx:' => 'match diff context lines', + 'dfpre:' => 'match pre-image git blob ID', + 'dfpost:' => 'match post-image git blob ID', + 'dfblob:' => 'match either pre or post-image git blob ID', ); chomp @HELP; -# TODO: -# df (filenames from diff) -# da (diff a/ removed lines) -# db (diff b/ added lines) my $mail_query = Search::Xapian::Query->new('T' . 'mail'); @@ -288,7 +300,7 @@ sub lookup_mail { # no ghosts! my ($self, $mid) = @_; retry_reopen($self, sub { my $smsg = lookup_message($self, $mid) or return; - PublicInbox::SearchMsg->load_doc($smsg->{doc}); + $smsg->load_expand; }); }