X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=compress_fingerprints;h=e53895b1c503c1fa5e832aa1c849e1787509b648;hp=eb701444da3744ee4fe08a7430c58f9a8bf28c43;hb=bdc410ca07593cfb41322c4245b6f8d569a59d95;hpb=87ae95e28bde0d599c32b2ea40cf527c764070fb diff --git a/compress_fingerprints b/compress_fingerprints index eb70144..e53895b 100644 --- a/compress_fingerprints +++ b/compress_fingerprints @@ -48,7 +48,7 @@ sub rank_fingerprint { my $sha1 = $fp->{sha1}; my $id = $fp->{id}; my $islead = $recs{$id}{lead}; - unless (defined $islead and $islead != 0) { + unless (defined $islead and $islead) { # only process records which haven't already been set as a sub unless ($fps{$sha1}) { # haven't seen this fp before. create a new hashref with the current @@ -62,8 +62,6 @@ sub rank_fingerprint { push @{ $fps{$sha1}{recs} }, $id; # and set this record as lead if it scores higher than current lead if ($fp->{compact} > $fps{$sha1}{lead}{score}) { - # $recs{ $fps{$sha1}{lead}{id} }{$sha1}{lead} = 0; - # $recs{ $id }{$sha1}{lead} = 1; $recs{ $fps{$sha1}{lead}{id} }{lead} = 0; $recs{ $id }{lead} = 1; $fps{$sha1}{lead}{id} = $id;