From c6941d5bfbb1aa3f04767cba8d5cd6a4cc8eceff Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 23 Jul 2026 05:50:53 +0000 Subject: [PATCH] t/lei-index: ignore {pct} in m: vs mid: queries Xapian 2.0.0 appears to score m: (probabilistic) and mid: (boolean) matches differently than the 1.4.x series. This seems to make sense since boolean matches score higher (as expected), so adjust our case to stop caring about the result of ->get_percent between different queries. This behavior was confirmed with Xapian 2.0 on both Debian sid/rc-buggy and FreeBSD 15. --- t/lei-index.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/lei-index.t b/t/lei-index.t index 2b28f1be5..3111926db 100644 --- a/t/lei-index.t +++ b/t/lei-index.t @@ -70,7 +70,8 @@ test_lei({ tmpdir => $tmpdir }, sub { 'imported blob'); lei_ok(qw(q m:qp@example.com --dedupe=none)); my $res_b = json_utf8->decode($lei_out); - is_deeply($res_b, $res_a, 'no extra DB entries'); + delete $_->[0]->{pct} for ($res_a, $res_b); + is_xdeeply $res_b, $res_a, 'no extra DB entries'; # ensure tag works on index-only messages: lei_ok(qw(tag +kw:seen t/utf8.eml)); -- 2.47.3