Commit 1cd87cfc authored by Lukáš Lalinský's avatar Lukáš Lalinský

Fixes

parent 73922158
......@@ -14,5 +14,5 @@ TRACK_MAX_OFFSET = 80
FINGERPRINT_MERGE_THRESHOLD = 0.95
# how many items must a fingerprint have to be indexed
FINGERPRINT_MIN_UNIQUE_ITEMS = 30
FINGERPRINT_MIN_UNIQUE_ITEMS = 80
......@@ -70,7 +70,8 @@ def insert_fingerprint(conn, data, submission_id=None, source_id=None):
'source_id': source_id,
})
conn.execute(insert_stmt)
logger.debug("Inserted fingerprint %r with data %r", id, data)
#logger.debug("Inserted fingerprint %r with data %r", id, data)
logger.debug("Inserted fingerprint %r", id)
return id
......
......@@ -96,7 +96,7 @@ def import_submission(conn, submission):
inc_fingerprint_submission_count(conn, fingerprint['id'])
for mbid in mbids:
insert_mbid(conn, fingerprint['track_id'], mbid, submission['id'], submission['source_id'])
if submission['puid']:
if submission['puid'] and submission['puid'] != '00000000-0000-0000-0000-000000000000':
insert_puid(conn, fingerprint['track_id'], submission['puid'], submission['id'], submission['source_id'])
if submission['meta_id']:
insert_track_meta(conn, fingerprint['track_id'], submission['meta_id'], submission['id'], submission['source_id'])
......
/* acoustid_compare.c */
#include <math.h>
#include "postgres.h"
#include "fmgr.h"
#include "utils/array.h"
......@@ -171,9 +172,6 @@ match_fingerprints2(int4 *a, int asize, int4 *b, int bsize, int maxoffset)
biterror += BITCOUNT64(*adata ^ *bdata);
}
score = (size * 2.0 / minsize) * (1.0 - 2.0 * (float4)biterror / (64 * size));
if (size < 200) {
score *= pow(log(size) / log(200), 1.5);
}
return score;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment