(index-ranking) Adjust the BM25P factors a bit
Since the bleed-flags set by the anchor tags logics have been changed to Site and SiteAdjacent, give them a bit of more importance when set together with ExternalLink. UrlDomain and UrlPath are also only more consistently only rewarded once.
This commit is contained in:
parent
acc2b4e10f
commit
eb59ac8535
@ -57,24 +57,30 @@ public class Bm25Factor {
|
||||
|
||||
double qcount = 0.;
|
||||
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.Site.asBit()) != 0)
|
||||
qcount += 0.5;
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.SiteAdjacent.asBit()) != 0)
|
||||
qcount += 0.5;
|
||||
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.ExternalLink.asBit()) != 0) {
|
||||
|
||||
qcount += 2.5;
|
||||
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.UrlDomain.asBit()) != 0)
|
||||
qcount += 2.5;
|
||||
else if ((keyword.encodedWordMetadata() & WordFlags.UrlPath.asBit()) != 0)
|
||||
qcount += 1;
|
||||
qcount += 1.5;
|
||||
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.Site.asBit()) != 0)
|
||||
qcount += 1.25;
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.SiteAdjacent.asBit()) != 0)
|
||||
qcount += 1.25;
|
||||
}
|
||||
else {
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.UrlPath.asBit()) != 0)
|
||||
qcount += 1;
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.UrlDomain.asBit()) != 0)
|
||||
qcount += 1.5;
|
||||
qcount += 3;
|
||||
else if ((keyword.encodedWordMetadata() & WordFlags.UrlPath.asBit()) != 0)
|
||||
qcount += 1;
|
||||
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.Site.asBit()) != 0)
|
||||
qcount += 0.5;
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.SiteAdjacent.asBit()) != 0)
|
||||
qcount += 0.5;
|
||||
}
|
||||
|
||||
if ((keyword.encodedWordMetadata() & WordFlags.Title.asBit()) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user