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 $_ }
# 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 $_ }
my $ibx = PublicInbox::Inbox->new(\%config);
my $f = $ibx->over->{dbh}->sqlite_db_filename;
my $over = PublicInbox::OverIdx->new($f);
- my $dbh = $over->connect;
+ my $dbh = $over->dbh;
my $non_ghost_tids = sub {
$dbh->selectall_arrayref(<<'');
SELECT tid FROM over WHERE num > 0 ORDER BY tid ASC
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}}++;
}