Skip to content

Commit c2e62c2

Browse files
committed
modify KNNSCAN function to support BatchKNNSCAN as well
1 parent 2354754 commit c2e62c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

commands.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ type Cmdable interface {
347347
MetaKeysWithFilter(ctx context.Context, pattern string, filters string) *StringSliceCmd
348348
GetMeta(ctx context.Context, key string) *StringCmd
349349
GetRowCount(ctx context.Context, key string) *StringCmd
350-
KNNScan(ctx context.Context, dataKeys []interface{}, knnSize string, numColumnsAndIndicesToSelect string, featureColIndexAndDimensions string, knnType string, knnThreshold string, vectors string) *StringSliceCmd
350+
KNNScan(ctx context.Context, dataKeys []interface{}, knnSize string, numColumnsAndIndicesToSelect string, featureColIndexAndDimensions string, knnType string, knnThreshold string, numVectors string, vectors string) *StringSliceCmd
351351
}
352352

353353
type StatefulCmdable interface {
@@ -2951,15 +2951,15 @@ func (c cmdable) GetRowCount(ctx context.Context, key string) *StringCmd {
29512951
return cmd
29522952
}
29532953

2954-
func (c cmdable) KNNScan(ctx context.Context, dataKeys []interface{}, knnSize string, numColumnsAndIndicesToSelect string, featureColIndexAndDimensions string, knnType string, knnThreshold string, vectors string) *StringSliceCmd {
2954+
func (c cmdable) KNNScan(ctx context.Context, dataKeys []interface{}, knnSize string, numColumnsAndIndicesToSelect string, featureColIndexAndDimensions string, knnType string, knnThreshold string, numVectors string, vectors string) *StringSliceCmd {
29552955
args := make([]interface{}, 8+len(dataKeys))
29562956
args[0] = "KNNSCAN"
29572957
args[1] = knnSize
29582958
args[2] = numColumnsAndIndicesToSelect
29592959
args[3] = featureColIndexAndDimensions
29602960
args[4] = knnType
29612961
args[5] = knnThreshold
2962-
args[6] = "1"
2962+
args[6] = numVectors
29632963
args[7] = vectors
29642964
for i, dataKey := range dataKeys {
29652965
args[8+i] = dataKey

0 commit comments

Comments
 (0)