about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiOverview.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-21 19:46:13 +0000
committerEric Wong <e@80x24.org>2021-01-22 16:18:01 -0400
commit7e947c849e3ceeb89c3d27952abdb10f9252c038 (patch)
tree19261dee7eabc09d2912cba2805ac4e960b0940a /lib/PublicInbox/LeiOverview.pm
parentef0c7b68b0af086aa1bd0c38f331e28c873b989d (diff)
downloadpublic-inbox-7e947c849e3ceeb89c3d27952abdb10f9252c038.tar.gz
lei_overview: rename {relevance} => {pct}
The old name was too long compared to the rest of the field
names.  With the Xapian method being named ->get_percent,
"pct" is a well known abbreviation for "percent" and already
used internally by our wrapper.

..And cleanup some excess whitespace while we're in the area.
Diffstat (limited to 'lib/PublicInbox/LeiOverview.pm')
-rw-r--r--lib/PublicInbox/LeiOverview.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/PublicInbox/LeiOverview.pm b/lib/PublicInbox/LeiOverview.pm
index cab2b055..8799f1cc 100644
--- a/lib/PublicInbox/LeiOverview.pm
+++ b/lib/PublicInbox/LeiOverview.pm
@@ -135,11 +135,9 @@ sub _unbless_smsg {
         delete @$smsg{qw(lines bytes num tid)};
         $smsg->{rt} = _iso8601(delete $smsg->{ts}); # JMAP receivedAt
         $smsg->{dt} = _iso8601(delete $smsg->{ds}); # JMAP UTCDate
-        $smsg->{relevance} = get_pct($mitem) if $mitem;
-
+        $smsg->{pct} = get_pct($mitem) if $mitem;
         if (my $r = delete $smsg->{references}) {
-                $smsg->{refs} = [
-                                map { "<$_>" } ($r =~ m/$MID_EXTRACT/go) ];
+                $smsg->{refs} = [ map { "<$_>" } ($r =~ m/$MID_EXTRACT/go) ];
         }
         if (my $m = delete($smsg->{mid})) {
                 $smsg->{'m'} = "<$m>";