diff options
| author | alex <[email protected]> | 2026-07-28 14:45:43 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-28 14:45:43 +0200 |
| commit | 68f62b4fd161f6563d29ac8a8e102218f59fae43 (patch) | |
| tree | d6cd27a63fceeceeca10870233c589db2a1a56cc /scoring/idf.go | |
| parent | 152c73d8205a252d4311595ffba562110334fd0f (diff) | |
| download | search-engine-68f62b4fd161f6563d29ac8a8e102218f59fae43.tar.xz search-engine-68f62b4fd161f6563d29ac8a8e102218f59fae43.zip | |
added field score calcualtions giving the title a higher weight
Diffstat (limited to 'scoring/idf.go')
| -rw-r--r-- | scoring/idf.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scoring/idf.go b/scoring/idf.go index 6d96089..5c85ba3 100644 --- a/scoring/idf.go +++ b/scoring/idf.go @@ -13,5 +13,5 @@ func CalculateIDF(totalDocs int, docFrequency int) float64 { } func ScoreTFIDF(p index.Posting, idf float64) float64 { - return float64(p.Count) * idf + return FieldScore(p) * idf } |
