MCPcopy
hub / github.com/redis/go-redis / VSimWithArgsWithScoresWithAttribs

Method VSimWithArgsWithScoresWithAttribs

vectorset_commands.go:450–461  ·  view source on GitHub ↗

`VSIM key (ELE | FP32 | VALUES num) (vector | element) [WITHSCORES] [WITHATTRIBS] [COUNT num] [EPSILON delta] [EF search-exploration-factor] [FILTER expression] [FILTER-EF max-filtering-effort] [TRUTH] [NOTHREAD]` WITHATTRIBS is only available in Redis v8.2.0+ note: the API is experimental and may b

(ctx context.Context, key string, val Vector, simArgs *VSimArgs)

Source from the content-addressed store, hash-verified

448// WITHATTRIBS is only available in Redis v8.2.0+
449// note: the API is experimental and may be subject to change.
450func (c cmdable) VSimWithArgsWithScoresWithAttribs(ctx context.Context, key string, val Vector, simArgs *VSimArgs) *VectorScoreAttribSliceCmd {
451 if simArgs == nil {
452 simArgs = &VSimArgs{}
453 }
454 args := []any{"vsim", key}
455 args = append(args, val.Value()...)
456 args = append(args, "withscores", "withattribs")
457 args = simArgs.appendArgs(args)
458 cmd := NewVectorScoreAttribSliceCmd(ctx, args...)
459 _ = c(ctx, cmd)
460 return cmd
461}
462
463// `VRANGE key start end count`
464// a negative count means to return all the elements in the vector set.

Callers

nothing calls this directly

Calls 3

ValueMethod · 0.65
appendArgsMethod · 0.45

Tested by

no test coverage detected