summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2019-12-28 17:34:54 +0000
committerdakkar <dakkar@thenautilus.net>2019-12-28 17:34:54 +0000
commit8c30e2c021af972bd865b59eacc314225db4b1d2 (patch)
tree8a28382e43237fb957ff51baf8d46110a1063b68
parentno need to .key on pairs we don't care about (diff)
downloadMaildirIndexer-8c30e2c021af972bd865b59eacc314225db4b1d2.tar.gz
MaildirIndexer-8c30e2c021af972bd865b59eacc314225db4b1d2.tar.bz2
MaildirIndexer-8c30e2c021af972bd865b59eacc314225db4b1d2.zip
better predictions with small folders
-rw-r--r--lib/MaildirIndexer/Index/ByAddresses.pm64
1 files 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;
}