Skip to content

Commit

Permalink
Fix length of result slice
Browse files Browse the repository at this point in the history
  • Loading branch information
philippgille committed Mar 4, 2024
1 parent 36ca898 commit fba6a3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion query.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func documentMatchesFilters(document *Document, where, whereDocument map[string]
}

func calcDocSimilarity(ctx context.Context, queryVectors []float32, docs []*Document) ([]Result, error) {
res := make([]Result, len(docs))
res := make([]Result, 0, len(docs))
resLock := sync.Mutex{}

// Determine concurrency. Use number of docs or CPUs, whichever is smaller.
Expand Down

0 comments on commit fba6a3e

Please sign in to comment.