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

Function generateVectorParamName

search_commands.go:3709–3716  ·  view source on GitHub ↗

generateVectorParamName returns a parameter name that is not already present in params. It is used to pass vector data via the PARAMS mechanism when the caller does not provide a VectorParamName, since inline vector blobs are no longer supported by Redis.

(params map[string]interface{})

Source from the content-addressed store, hash-verified

3707// caller does not provide a VectorParamName, since inline vector blobs are no
3708// longer supported by Redis.
3709func generateVectorParamName(params map[string]interface{}) string {
3710 for i := 0; ; i++ {
3711 name := fmt.Sprintf("__vector_param_%d", i)
3712 if _, ok := params[name]; !ok {
3713 return name
3714 }
3715 }
3716}
3717
3718// FTHybridWithArgs - Executes a hybrid search with advanced options
3719// FTHybridWithArgs is still experimental, the command behaviour and signature may change

Callers 2

FTHybridWithArgsMethod · 0.85

Calls

no outgoing calls

Tested by 1