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/IMAP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/IMAP.pm') diff --git a/lib/PublicInbox/IMAP.pm b/lib/PublicInbox/IMAP.pm index abdb8fec..d540fd0b 100644 --- a/lib/PublicInbox/IMAP.pm +++ b/lib/PublicInbox/IMAP.pm @@ -1187,7 +1187,7 @@ sub refill_xap ($$$$) { my ($beg, $end) = @$range_info; my $srch = $self->{ibx}->search; my $opt = { mset => 2, limit => 1000 }; - my $mset = $srch->query("$q uid:$beg..$end", $opt); + my $mset = $srch->mset("$q uid:$beg..$end", $opt); @$uids = @{$srch->mset_to_artnums($mset)}; if (@$uids) { $range_info->[0] = $uids->[-1] + 1; # update $beg -- cgit v1.2.3-24-ge0c7