From 80b887f29b2ec71d025b4c266a1c26314758994c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 2 Sep 2020 11:04:16 +0000 Subject: 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. --- lib/PublicInbox/ExtMsg.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/ExtMsg.pm') 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); } } -- cgit v1.2.3-24-ge0c7