Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion local_examples/client-specific/redis-py/search_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@
req = (
aggregations.AggregateRequest("*")
.group_by("@category", reducers.avg("@price").alias("avg_price"))
.sort_by(aggregations.Desc("@avg_price"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aggregation example drops sort order

Medium Severity

The agg_avg request no longer applies sort_by on @avg_price, so group order is undefined. The expected output still lists Computers first at 864.495, which only holds under descending sort, and the aggregation tutorial still presents this step as ordering groups with SORTBY.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7206719. Configure here.

)
res = index.aggregate(req).rows
print(res)
Expand Down
Loading