From 48986574ae4d8e05bed2f7f56c5f1ae0f7ba336f Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Mon, 6 Nov 2023 12:56:21 +0100 Subject: [PATCH] (result-ranking) Use a weighted calculation of priority term importance --- .../main/java/nu/marginalia/ranking/factors/Bm25Factor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/features-index/result-ranking/src/main/java/nu/marginalia/ranking/factors/Bm25Factor.java b/code/features-index/result-ranking/src/main/java/nu/marginalia/ranking/factors/Bm25Factor.java index 762a792c..13c99ecc 100644 --- a/code/features-index/result-ranking/src/main/java/nu/marginalia/ranking/factors/Bm25Factor.java +++ b/code/features-index/result-ranking/src/main/java/nu/marginalia/ranking/factors/Bm25Factor.java @@ -59,15 +59,15 @@ public class Bm25Factor { if ((keyword.encodedWordMetadata() & WordFlags.SiteAdjacent.asBit()) != 0) qcount += 0.5; if ((keyword.encodedWordMetadata() & WordFlags.UrlPath.asBit()) != 0) - qcount += 0.75; + qcount += 1.25; if ((keyword.encodedWordMetadata() & WordFlags.UrlDomain.asBit()) != 0) qcount += 1.25; if ((keyword.encodedWordMetadata() & WordFlags.ExternalLink.asBit()) != 0) - qcount += 1; + qcount += 2.5; if ((keyword.encodedWordMetadata() & WordFlags.Title.asBit()) != 0) qcount += 1.5; if ((keyword.encodedWordMetadata() & WordFlags.Subjects.asBit()) != 0) - qcount += 1.5; + qcount += 1.25; if ((keyword.encodedWordMetadata() & WordFlags.NamesWords.asBit()) != 0) qcount += 0.25; if ((keyword.encodedWordMetadata() & WordFlags.TfIdfHigh.asBit()) != 0)