From 8c30e2c021af972bd865b59eacc314225db4b1d2 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 28 Dec 2019 17:34:54 +0000 Subject: better predictions with small folders --- lib/MaildirIndexer/Index/ByAddresses.pm6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MaildirIndexer/Index/ByAddresses.pm6 b/lib/MaildirIndexer/Index/ByAddresses.pm6 index 4f24b37..b83a239 100644 --- a/lib/MaildirIndexer/Index/ByAddresses.pm6 +++ b/lib/MaildirIndexer/Index/ByAddresses.pm6 @@ -51,8 +51,8 @@ method del-path(IO:D $file, Str:D $mailbox --> Nil) { } submethod p-address-given-mailbox(Str $addr, Str $mailbox) { - my $a = 1 + $!count-by-address-and-mailbox{$addr => $mailbox}; - my $b = 2 + $!count-by-mailbox{$mailbox}; + my $a = 1e-15 + $!count-by-address-and-mailbox{$addr => $mailbox}; + my $b = 1 + $!count-by-mailbox{$mailbox}; return $a / $b; } -- cgit v1.2.3