@arsedizioni/ars-utils 21.1.92 → 21.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1311,7 +1311,7 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
|
|
|
1311
1311
|
});
|
|
1312
1312
|
maxScore = maxScore - minScore;
|
|
1313
1313
|
r.value.items[0].anchors.forEach(n => {
|
|
1314
|
-
let score = (n.score - minScore) / maxScore
|
|
1314
|
+
let score = maxScore > 0 ? (n.score - minScore) / maxScore : 0;
|
|
1315
1315
|
console.log('Anchor score', n.score, minScore, maxScore, score);
|
|
1316
1316
|
n.score = score;
|
|
1317
1317
|
n.veryRelevant = score > 0.7;
|
|
@@ -2194,8 +2194,7 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
|
|
|
2194
2194
|
anchors.push({ text: a.typeDescription });
|
|
2195
2195
|
anchorType = a.type;
|
|
2196
2196
|
}
|
|
2197
|
-
let score = (a.score - minScore) / maxScore;
|
|
2198
|
-
console.log('Anchor score', a.score, minScore, maxScore, score);
|
|
2197
|
+
let score = maxScore > 0 ? (a.score - minScore) / maxScore : 0;
|
|
2199
2198
|
anchors.push({
|
|
2200
2199
|
text: a.text,
|
|
2201
2200
|
title: a.title,
|