From 02caed1edb2871ffb75759971efa12b8e3dcd0e3 Mon Sep 17 00:00:00 2001 From: Aditi Ahuja Date: Wed, 9 Oct 2024 18:41:04 +0530 Subject: [PATCH] Fix populating the filter hits map --- search_knn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/search_knn.go b/search_knn.go index 81a9de18f..168bfea74 100644 --- a/search_knn.go +++ b/search_knn.go @@ -407,8 +407,8 @@ func (i *indexImpl) runKnnCollector(ctx context.Context, req *SearchRequest, rea filterHits := filterColl.Results() if len(filterHits) > 0 { filterHitsMap[idx] = make([]index.IndexInternalID, len(filterHits)) - for _, docMatch := range filterHits { - filterHitsMap[idx] = append(filterHitsMap[idx], docMatch.IndexInternalID) + for i, docMatch := range filterHits { + filterHitsMap[idx][i] = docMatch.IndexInternalID } requiresFiltering[idx] = true }