@@ -287,8 +287,7 @@ type VSimArgs struct {
287
287
FilterEF int64
288
288
Truth bool
289
289
NoThread bool
290
- // The `VSim` command in Redis has the option, by the doc in Redis.io don't have.
291
- // Epsilon float64
290
+ Epsilon float64
292
291
}
293
292
294
293
func (v VSimArgs ) appendArgs (args []any ) []any {
@@ -310,13 +309,13 @@ func (v VSimArgs) appendArgs(args []any) []any {
310
309
if v .NoThread {
311
310
args = append (args , "nothread" )
312
311
}
313
- // if v.Epsilon > 0 {
314
- // args = append(args, "Epsilon", v.Epsilon)
315
- // }
312
+ if v .Epsilon > 0 {
313
+ args = append (args , "Epsilon" , v .Epsilon )
314
+ }
316
315
return args
317
316
}
318
317
319
- // `VSIM key (ELE | FP32 | VALUES num) (vector | element) [COUNT num]
318
+ // `VSIM key (ELE | FP32 | VALUES num) (vector | element) [COUNT num] [EPSILON delta]
320
319
// [EF search-exploration-factor] [FILTER expression] [FILTER-EF max-filtering-effort] [TRUTH] [NOTHREAD]`
321
320
// note: the API is experimental and may be subject to change.
322
321
func (c cmdable ) VSimWithArgs (ctx context.Context , key string , val Vector , simArgs * VSimArgs ) * StringSliceCmd {
@@ -331,7 +330,7 @@ func (c cmdable) VSimWithArgs(ctx context.Context, key string, val Vector, simAr
331
330
return cmd
332
331
}
333
332
334
- // `VSIM key (ELE | FP32 | VALUES num) (vector | element) [WITHSCORES] [COUNT num]
333
+ // `VSIM key (ELE | FP32 | VALUES num) (vector | element) [WITHSCORES] [COUNT num] [EPSILON delta]
335
334
// [EF search-exploration-factor] [FILTER expression] [FILTER-EF max-filtering-effort] [TRUTH] [NOTHREAD]`
336
335
// note: the API is experimental and may be subject to change.
337
336
func (c cmdable ) VSimWithArgsWithScores (ctx context.Context , key string , val Vector , simArgs * VSimArgs ) * VectorScoreSliceCmd {
0 commit comments