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/SearchView.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/SearchView.pm') diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 892e8fda..c482f1c9 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -47,7 +47,6 @@ sub sres_top_html { my $opts = { limit => $q->{l}, offset => $o, - mset => 1, relevance => $q->{r}, thread => $q->{t}, asc => $asc, @@ -55,7 +54,7 @@ sub sres_top_html { my ($mset, $total, $err, $html); retry: eval { - $mset = $srch->query($query, $opts); + $mset = $srch->mset($query, $opts); $total = $mset->get_matches_estimated; }; $err = $@; -- cgit v1.2.3-24-ge0c7