Skip to content

DEV: (cmds) FT.AGGREGATE - add COLLECT reducer#3320

Open
dwdougherty wants to merge 2 commits into
DOC-6334from
DOC-6571
Open

DEV: (cmds) FT.AGGREGATE - add COLLECT reducer#3320
dwdougherty wants to merge 2 commits into
DOC-6334from
DOC-6571

Conversation

@dwdougherty
Copy link
Copy Markdown
Collaborator

@dwdougherty dwdougherty commented May 14, 2026

Redis 8.8 feature

@Itzikvaknin I couldn't add you directly as a docs reviewer, but I'm hoping you can review as a guest (just leave a comment).


Note

Low Risk
Documentation-only changes; primary risk is inaccuracies in the new COLLECT syntax/semantics or generated diagram updates confusing users.

Overview
Adds documentation for the new REDUCE COLLECT reducer in FT.AGGREGATE (Redis 8.8.0), including the formal argument/schema definition, detailed reducer reference, and a new end-to-end example for collecting top documents per group.

Expands the FT.AGGREGATE command docs with additional argument summaries and a much more explicit APPLY expression/function grammar, and updates the ft.aggregate railroad diagram (static/images/railroad/ft.aggregate.svg) to reflect the new syntax.

Reviewed by Cursor Bugbot for commit ffd9ebd. Bugbot is set up for automated code reviews on this repo. Configure here.

@dwdougherty dwdougherty requested a review from a team May 14, 2026 14:42
@dwdougherty dwdougherty self-assigned this May 14, 2026
@dwdougherty dwdougherty added the oss Redis Open Source label May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

DOC-6571

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 14, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 05f82f9. Configure here.

Comment thread content/commands/ft.aggregate.md
Copy link
Copy Markdown
Contributor

@andy-stark-redis andy-stark-redis left a comment

Choose a reason for hiding this comment

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

Language LGTM.

@dwdougherty
Copy link
Copy Markdown
Collaborator Author

TYVM, @andy-stark-redis!

Comment thread content/commands/ft.aggregate.md Outdated
Comment thread content/commands/ft.aggregate.md Outdated

**Description**

Fetch complete documents or project specific fields directly within an aggregation query, with optional sorting, limiting, and deduplication per group.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I’m not sure whether Fetch is the right term here. Since you’re already familiar with the issue I mentioned in the other comments, I’ll leave it to your judgment.

@Itzikvaknin
Copy link
Copy Markdown
Contributor

image

Copy link
Copy Markdown
Contributor

@Itzikvaknin Itzikvaknin left a comment

Choose a reason for hiding this comment

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

Looks good!
I left a few comments to improve clarity and correctness.

@dwdougherty
Copy link
Copy Markdown
Collaborator Author

Thank you, @Itzikvaknin!

@dwdougherty
Copy link
Copy Markdown
Collaborator Author

image

This can only be fixed by modifying the commands.json file, because that's the source of the railroad diagrams.

@dwdougherty dwdougherty requested a review from Itzikvaknin May 18, 2026 14:28
@oshadmi
Copy link
Copy Markdown
Contributor

oshadmi commented May 18, 2026

@Itzikvaknin Also need nargs after COLLECT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge yet oss Redis Open Source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants