p3: keep original URLs on RRF/dedupe; rerank=false is not a merge
CanonicalURL is the dedupe key only. Hits keep the first source's original URL, including a trailing slash. Dedupe has the same rule.
This commit is contained in:
@@ -79,13 +79,14 @@ func Dedupe(in []Hit) []Hit {
|
||||
if canon == "" {
|
||||
continue
|
||||
}
|
||||
h.URL = canon
|
||||
if s, ok := seen[canon]; ok {
|
||||
if len(h.Snippet) > len(s.h.Snippet) {
|
||||
src := s.h.Source
|
||||
keep := s.h.URL
|
||||
sc := s.h.Score
|
||||
s.h = h
|
||||
s.h.Source = src
|
||||
s.h.URL = keep
|
||||
if sc > s.h.Score {
|
||||
s.h.Score = sc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user