diff --git a/vectorset_commands.go b/vectorset_commands.go index 2bd9e2216..96be1af11 100644 --- a/vectorset_commands.go +++ b/vectorset_commands.go @@ -287,8 +287,7 @@ type VSimArgs struct { FilterEF int64 Truth bool NoThread bool - // The `VSim` command in Redis has the option, by the doc in Redis.io don't have. - // Epsilon float64 + Epsilon float64 } func (v VSimArgs) appendArgs(args []any) []any { @@ -310,13 +309,13 @@ func (v VSimArgs) appendArgs(args []any) []any { if v.NoThread { args = append(args, "nothread") } - // if v.Epsilon > 0 { - // args = append(args, "Epsilon", v.Epsilon) - // } + if v.Epsilon > 0 { + args = append(args, "Epsilon", v.Epsilon) + } return args } -// `VSIM key (ELE | FP32 | VALUES num) (vector | element) [COUNT num] +// `VSIM key (ELE | FP32 | VALUES num) (vector | element) [COUNT num] [EPSILON delta] // [EF search-exploration-factor] [FILTER expression] [FILTER-EF max-filtering-effort] [TRUTH] [NOTHREAD]` // note: the API is experimental and may be subject to change. 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 return cmd } -// `VSIM key (ELE | FP32 | VALUES num) (vector | element) [WITHSCORES] [COUNT num] +// `VSIM key (ELE | FP32 | VALUES num) (vector | element) [WITHSCORES] [COUNT num] [EPSILON delta] // [EF search-exploration-factor] [FILTER expression] [FILTER-EF max-filtering-effort] [TRUTH] [NOTHREAD]` // note: the API is experimental and may be subject to change. func (c cmdable) VSimWithArgsWithScores(ctx context.Context, key string, val Vector, simArgs *VSimArgs) *VectorScoreSliceCmd {