Skip to content

[BUG] No aggregate for big number #6217

Open
@Cheban1996

Description

@Cheban1996

Describe the bug

Redis incorrectly aggregates

To reproduce

Create index
FT.CREATE token_score_idx ON HASH PREFIX 1 token: SCHEMA id NUMERIC SORTABLE score NUMERIC

Insert values

import redis
r = redis.Redis(host='localhost', port=6379, db=0)
for i in range(1_000_000):
    fields = {
        "id": 1,
        "score": 10,
    }
    r.hset(f"token:{i}", mapping=fields)

Run the aggregation
FT.AGGREGATE token_score_idx * GROUPBY 1 @id REDUCE COUNT 0 AS online REDUCE SUM 1 @score AS score
return random number - no aggregate, but expect 1 id 1 online 1000000 score 10000000

But if run
FT.AGGREGATE token_score_idx * GROUPBY 1 @id REDUCE COUNT 0 AS online

return 1 id 1 online 1000000 - aggregate correct

Sometimes in log i got 1:M 02 Jun 2025 13:00:06.626 # <search> fork failed - got errno 17, aborting fork GC

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions