Skip to content

Commit

Permalink
Fix panic on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
TreehouseFalcon committed Sep 7, 2023
1 parent 24d69b1 commit e04633e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/search/ivf.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ func (idx *IVF) Build(_ context.Context) {
nextDistance = d
}
}
if nextCluster == -1 {
return nil
}
if nextCluster != assignments[i] {
errorCount.Inc()
}
Expand Down

0 comments on commit e04633e

Please sign in to comment.