mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(rank) Reduce the impact of domain rank bonus, and only apply it to cancel out negative penalties, never to increase the ranking
This commit is contained in:
parent
9fc82574f0
commit
cf7f84f033
@ -69,7 +69,7 @@ public class ResultRankingParameters {
|
||||
.bm25Params(new Bm25Parameters(1.2, 0.5))
|
||||
.shortDocumentThreshold(2000)
|
||||
.shortDocumentPenalty(2.)
|
||||
.domainRankBonus(1 / 25.)
|
||||
.domainRankBonus(1 / 100.)
|
||||
.qualityPenalty(1 / 15.)
|
||||
.shortSentenceThreshold(2)
|
||||
.shortSentencePenalty(5)
|
||||
|
@ -129,9 +129,9 @@ public class IndexResultScoreCalculator {
|
||||
double score = normalize(
|
||||
score_firstPosition + score_proximity + score_verbatim
|
||||
+ score_bM25
|
||||
+ score_bFlags
|
||||
+ Math.max(0, documentBonus),
|
||||
-Math.min(0, documentBonus));
|
||||
+ score_bFlags,
|
||||
-Math.min(0, documentBonus) // The magnitude of documentBonus, if it is negative; otherwise 0
|
||||
);
|
||||
|
||||
if (Double.isNaN(score)) { // This should never happen but if it does, we want to know about it
|
||||
if (getClass().desiredAssertionStatus()) {
|
||||
|
Loading…
Reference in New Issue
Block a user