Skip to content

Commit 1cf52d8

Browse files
added changes
1 parent 7b14cac commit 1cf52d8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tok/partitioned_hnsw/partitioned_hnsw.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ type partitionedHNSW[T c.Float] struct {
2121

2222
clusterMap map[int]index.VectorIndex[T]
2323
numClusters int
24-
factory index.IndexFactory[T]
2524
partition index.VectorPartitionStrat[T]
2625

2726
hnswOptions opt.Options
@@ -45,9 +44,9 @@ func (ph *partitionedHNSW[T]) applyOptions(o opt.Options) error {
4544

4645
ph.buildPass = 0
4746
ph.hnswOptions = o
48-
ph.factory = hnsw.CreateFactory[T](ph.floatBits)
4947
for i := range ph.numClusters {
50-
vi, err := ph.factory.Create(ph.pred, ph.hnswOptions, ph.floatBits)
48+
factory := hnsw.CreateFactory[T](ph.floatBits)
49+
vi, err := factory.Create(ph.pred, ph.hnswOptions, ph.floatBits)
5150
if err != nil {
5251
return err
5352
}

0 commit comments

Comments
 (0)