Skip to content

Commit 87314e1

Browse files
Restore the commment
1 parent 1f8bf83 commit 87314e1

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

search/searcher/search_custom_fields.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ import (
2222
index "github.com/blevesearch/bleve_index_api"
2323
)
2424

25-
// loadDocValuesOnHit resolves hit.ID and returns the hit's doc-value fields in a
26-
// new map the caller owns. See loadDocValuesOnHitWithTypes.
27-
func loadDocValuesOnHit(hit *search.DocumentMatch, dvReader index.DocValueReader,
28-
r index.IndexReader) (map[string]interface{}, error) {
29-
return loadDocValuesOnHitWithTypes(hit, dvReader, r, nil)
30-
}
31-
3225
// loadDocValuesOnHitWithTypes resolves hit.ID and returns the hit's doc-value
3326
// fields in a new map. It does not touch hit.Fields, so these UDF-input fields
3427
// can't leak into SearchRequest.Fields; the caller owns the map. Returns nil

search_knn.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,7 @@ func setKnnHitsInCollector(knnHits []*search.DocumentMatch, coll *collector.TopN
479479
mergeFn := func(ftsMatch *search.DocumentMatch, knnMatch *search.DocumentMatch) {
480480
// Boost the FTS score using the KNN score
481481
ftsMatch.Score += knnMatch.Score
482-
// Capture the merged explanation; MergeWith doesn't always mutate
483-
// the receiver, so ignoring the return value drops the KNN part.
482+
// Combine the FTS explanation with the KNN explanation, if present
484483
ftsMatch.Expl = ftsMatch.Expl.MergeWith(knnMatch.Expl)
485484
}
486485
coll.SetKNNHits(knnHits, search.HybridMergeCallbackFn(mergeFn))

0 commit comments

Comments
 (0)