X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fv2reindex.t;h=05ea952f43e1002f08028d5bb277208f816bb8d3;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=a2fc20757d2f0a33e4d90918aa1e4fe5d977da36;hpb=1814b1a0b78770c8ba9e7a0adef56c4c324d4064;p=public-inbox.git diff --git a/t/v2reindex.t b/t/v2reindex.t index a2fc2075..05ea952f 100644 --- a/t/v2reindex.t +++ b/t/v2reindex.t @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2020 all contributors +# Copyright (C) 2018-2021 all contributors # License: AGPL-3.0+ use strict; use warnings; @@ -153,7 +153,7 @@ ok(!-d $xap, 'Xapian directories removed again'); delete $ibx->{mm}; is_deeply([ $ibx->mm->minmax ], $minmax, 'minmax unchanged'); is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); - my $mset = $ibx->search->query($phrase, {mset=>1}); + my $mset = $ibx->search->mset($phrase); isnt($mset->size, 0, "phrase search succeeds on indexlevel=full"); for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ } @@ -184,12 +184,12 @@ ok(!-d $xap, 'Xapian directories removed again'); # not sure why, but Xapian seems to fallback to terms and # phrase searches still work delete $ibx->{search}; - my $mset = $ibx->search->query($phrase, {mset=>1}); + my $mset = $ibx->search->mset($phrase); is($mset->size, 0, 'phrase search does not work on medium'); } my $words = $phrase; $words =~ tr/"'//d; - my $mset = $ibx->search->query($words, {mset=>1}); + my $mset = $ibx->search->mset($words); isnt($mset->size, 0, "normal search works on indexlevel=medium"); for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ } @@ -531,7 +531,8 @@ EOF my %uniq; for my $s (qw(uno dos tres)) { - my $msgs = $ibx->search->query("s:$s"); + my $mset = $ibx->search->mset("s:$s"); + my $msgs = $ibx->search->mset_to_smsg($ibx, $mset); is(scalar(@$msgs), 1, "only one result for `$s'"); $uniq{$msgs->[0]->{num}}++; }