We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have provided an example program that doesn't panic when the command run on the database should return an error.
Panic with error message (error) Unknown argument AS at position 4 for <main>
(error) Unknown argument
at position 4 for <main>
The resulting pointer is nil and error is empty causing no panic. result: 0x0
result: 0x0
package main import ( "context" "strings" "github.com/redis/go-redis/v9" ) func createIndexAndLoadData(client *redis.Client, ctx context.Context) { if _, err := client.FTCreate(ctx, "temp", &redis.FTCreateOptions{Prefix: []interface{}{"user:"}}, &redis.FieldSchema{FieldName: "__key", FieldType: redis.SearchFieldTypeText}, ).Result(); err != nil && !strings.Contains(err.Error(), "Index already exists") { panic(err) } if _, err := client.HSet(ctx, "user:1", []string{"__key", "v1"}).Result(); err != nil { panic(err) } } func runAggregateQuery(client *redis.Client, ctx context.Context) { filterOpts := &redis.FTAggregateOptions{ Load: []redis.FTAggregateLoad{ { Field: "@__key", As: "key", }, }, } result, err := client.FTAggregateWithArgs(ctx, "temp", "*", filterOpts).Result() if err != nil { panic(err) } println("result:", result) } func main() { ctx := context.Background() client := redis.NewClient(&redis.Options{ Addr: "localhost:6379", Protocol: 2, }) createIndexAndLoadData(client, ctx) runAggregateQuery(client, ctx) }
Removing the As field fixes the issue and a proper response is returned.
As
Attempting to recreate a separate issue. The database is OSS 6.2.7.
The text was updated successfully, but these errors were encountered:
fix (redis#3220)
77a3aed
* LOAD has NO AS param(https://redis.io/docs/latest/commands/ft.aggregate/) * fix typo: WITHCOUT -> WITHCOUNT
No branches or pull requests
I have provided an example program that doesn't panic when the command run on the database should return an error.
Expected Behavior
Panic with error message
(error) Unknown argument
ASat position 4 for <main>
Current Behavior
The resulting pointer is nil and error is empty causing no panic.
result: 0x0
Steps to Reproduce
Removing the
As
field fixes the issue and a proper response is returned.Context (Environment)
Attempting to recreate a separate issue. The database is OSS 6.2.7.
The text was updated successfully, but these errors were encountered: