about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiXSearch.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-06-23 07:14:20 -0400
committerEric Wong <e@80x24.org>2021-06-23 19:24:48 +0000
commit4d594e98063aaad1ce9a90709af7edc5c44a0163 (patch)
tree50e8ac2cb3b74405ae66bf022f10001fe9c69d32 /lib/PublicInbox/LeiXSearch.pm
parent2016078cefa7e4438217e54bb0421a5d5f0b151f (diff)
downloadpublic-inbox-4d594e98063aaad1ce9a90709af7edc5c44a0163.tar.gz
This allows us to simplify callers throughout, and exceptions are
can no longer be silently hidden.  MiscSearch now uses xap_terms
for looking up eidx_key terms for a code reduction.

We also simplify LeiStore->_msg_kw for runtime use by moving the
MsetIterator handling into t/lei_store.t test case.
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r--lib/PublicInbox/LeiXSearch.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index beb955bb..cac7fb7d 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -71,11 +71,11 @@ sub _mitem_kw { # retry_reopen callback
         my $doc = $mitem->get_document;
         my $kw = xap_terms('K', $doc);
         $kw->{flagged} = 1 if $flagged;
-        my $L = xap_terms('L', $doc);
+        my @L = xap_terms('L', $doc);
         # we keep the empty {kw} array here to prevent expensive work in
         # ->xsmsg_vmd, _unbless_smsg will clobber it iff it's empty
         $smsg->{kw} = [ sort keys %$kw ];
-        $smsg->{L} = [ sort keys %$L ] if scalar(keys %$L);
+        $smsg->{L} = \@L if scalar(@L);
 }
 
 sub mitem_kw ($$$;$) {