Skip to content

Commit

Permalink
Merge pull request #38 from philippgille/fix-result-slice-length
Browse files Browse the repository at this point in the history
Fix length of result slice
  • Loading branch information
philippgille authored Mar 4, 2024
2 parents 36ca898 + fba6a3e commit 4121136
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 4121136

Please sign in to comment.