dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

aggregate group by might not work for the snippet below

Open romange opened this issue 1 year ago • 1 comments

const sumTest = await redis.ft.aggregate('myindex', `@name:{${name}}`,
    {
        STEPS: [{
            type: AggregateSteps.GROUPBY,
            REDUCE: [{
                type: AggregateGroupByReducers.SUM,
                property: 'foo',
                AS: 'total_p'
            }]
        }]
    })

return sumTest?.results[0]?.total_p || 0

it returns 0, even though this property exists.

romange avatar Aug 10 '24 12:08 romange

DF responds with Unknown clause: SUM and Unknown clause: REDUCE

romange avatar Aug 10 '24 12:08 romange