Open
Description
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