From 9d0499041410a9b0be3686f79b4e36d7e7355dee Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 28 Jul 2026 14:57:49 +0200 Subject: added TitlePositions and BodyPositions to the posting struct to prepare for proximity scoring --- scoring/field.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scoring/field.go') diff --git a/scoring/field.go b/scoring/field.go index 9637950..d84ab3b 100644 --- a/scoring/field.go +++ b/scoring/field.go @@ -6,5 +6,5 @@ var TitleWeight = 5.0 var BodyWeight = 1.0 func FieldScore(p index.Posting) float64 { - return (float64(p.TitleCount) * TitleWeight) + (float64(p.Count) * BodyWeight) + return (float64(p.TitleCount) * TitleWeight) + (float64(p.BodyCount) * BodyWeight) } -- cgit v1.2.3