Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions vectorset_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
Loading