From 22d8fcc3d37b9ce13a5088f1d0557078c9a84062 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 2 Oct 2015 21:15:07 +0000 Subject: rename mid_compress to id_compress We use it as a general compressor for identifiers such as subject paths, so using the "mid_" prefix probably is not appropriate. --- lib/PublicInbox/Search.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Search.pm') diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 1d13f4b8..fbc6882c 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -14,7 +14,7 @@ use constant LINES => 3; # :lines as defined in RFC 3977 use Search::Xapian qw/:standard/; use PublicInbox::SearchMsg; use Email::MIME; -use PublicInbox::MID qw/mid_clean mid_compress/; +use PublicInbox::MID qw/mid_clean id_compress/; # This is English-only, everything else is non-standard and may be confused as # a prefix common in patch emails @@ -25,7 +25,7 @@ use constant { # SCHEMA_VERSION history # 0 - initial # 1 - subject_path is lower-cased - # 2 - subject_path is mid_compress in the index, only + # 2 - subject_path is id_compress in the index, only # 3 - message-ID is compressed if it includes '%' (hack!) # 4 - change "Re: " normalization, avoid circular Reference ghosts # 5 - subject_path drops trailing '.' @@ -104,7 +104,7 @@ sub get_thread { return { total => 0, msgs => [] } unless $smsg; my $qtid = Search::Xapian::Query->new(xpfx('thread').$smsg->thread_id); - my $path = mid_compress($smsg->path); + my $path = id_compress($smsg->path); my $qsub = Search::Xapian::Query->new(xpfx('path').$path); my $query = Search::Xapian::Query->new(OP_OR, $qtid, $qsub); $self->do_enquire($query, $opts); -- cgit v1.2.3-24-ge0c7