RediSearch / redisearch-go

Go client for RediSearch
https://redisearch.io
BSD 3-Clause "New" or "Revised" License
288 stars 65 forks source link

Error parsing Aggregate Reply #154

Closed adiongue closed 2 years ago

adiongue commented 2 years ago

I have tried to use group with reducerTOLIST, redisearch.GroupByReducerToList but I got the following error

My request: redisearch.AggregateQuery{Max: 100000}.GroupBy(redisearch.GroupBy{Fields: []string{"@name"}, Reducers: []redisearch.Reducer{{Alias: "ids", Name: redisearch.GroupByReducerToList, Args: []string{"@b_id"}}}

Error: Error parsing Aggregate Reply: redigo: unexpected element type for Strings, got type []interface {} on reply position 4

Do you know if there is another way to do this request please ?

Thank!

Avital-Fine commented 2 years ago

@adiongue I fixed it in #157. Now the returned type is different but it makes more sense to me. Let me know if you still having trouble with that!

adiongue commented 2 years ago

thank you @Avital-Fine I'll test that

adiongue commented 2 years ago

@Avital-Fine I use the last version of master but the aggregate function still returns [][]string

Avital-Fine commented 2 years ago

Use AggregateQuery() (I couldn't break it so I deprecated the old version)

adiongue commented 2 years ago

it's working! thanks @Avital-Fine