about summary refs log tree commit homepage
path: root/lib/PublicInbox/ExtMsg.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-09-02 11:04:16 +0000
committerEric Wong <e@80x24.org>2020-09-03 20:11:03 +0000
commit80b887f29b2ec71d025b4c266a1c26314758994c (patch)
tree31f9937daf20c21b33c0407763bf2d6bd06d2f66 /lib/PublicInbox/ExtMsg.pm
parent851aa7183cf2b152d7ff187729bc896597d22fad (diff)
downloadpublic-inbox-80b887f29b2ec71d025b4c266a1c26314758994c.tar.gz
search: replace ->query with ->mset
Nearly all of the search uses in the production code rely on
a Xapian mset iterator being returned (instead of an array
of $smsg objects).  So default to returning the mset and move
the burden of smsg array conversion into the test cases.
Diffstat (limited to 'lib/PublicInbox/ExtMsg.pm')
-rw-r--r--lib/PublicInbox/ExtMsg.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm
index 65892161..5dffc65c 100644
--- a/lib/PublicInbox/ExtMsg.pm
+++ b/lib/PublicInbox/ExtMsg.pm
@@ -65,10 +65,10 @@ sub search_partial ($$) {
                 # has too many results.  $@ can be
                 # Search::Xapian::QueryParserError or even:
                 # "something terrible happened at ../Search/Xapian/Enquire.pm"
-                my $mset = eval { $srch->query($m, $opt) } or next;
+                my $mset = eval { $srch->mset($m, $opt) } or next;
                 my @mids = map {
                         $_->{mid}
-                } @{$ibx->over->get_all(@{$srch->mset_to_artnums($mset)})};
+                } @{$srch->mset_to_smsg($ibx, $mset)};
                 return \@mids if scalar(@mids);
         }
 }