Skip to content

Add FT.ALIASLIST search command support#518

Open
uglide wants to merge 5 commits into
masterfrom
im/8_10-ft-alias-list
Open

Add FT.ALIASLIST search command support#518
uglide wants to merge 5 commits into
masterfrom
im/8_10-ft-alias-list

Conversation

@uglide

@uglide uglide commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Add support for the FT.ALIASLIST command (Query Engine 8.10), which lists all aliases associated with a given index.

  • Add ALIASLIST constant and SearchCommandBuilder.AliasList(index)
  • Expose AliasList / AliasListAsync on ISearchCommands and ISearchCommandsAsync (returning RedisResult[], matching _List/TagVals)
  • Register the new public API surface in PublicAPI.Unshipped.txt
  • Add sync and async integration tests (guarded to Redis 8.10+)

Note

Low Risk
Additive public API and thin command passthrough with no changes to auth or existing alias behavior; primary risk is callers on Redis versions before 8.10 where the command is unavailable.

Overview
Adds FT.ALIASLIST (Query Engine 8.10+) so callers can list all aliases bound to a RediSearch index name.

New AliasList / AliasListAsync APIs on the search command interfaces and implementations return RedisResult[], aligned with _List and TagVals. Wiring includes the FT.ALIASLIST literal, SearchCommandBuilder.AliasList, and entries in PublicAPI.Unshipped.txt.

Integration tests cover empty results, add/remove alias flows, and server errors for missing indexes (Redis 8.10+). Existing alias tests reuse shared helpers that skip on legacy cluster CROSSSLOT failures from FT.ALIASADD.

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

uglide added 2 commits July 14, 2026 17:26
Add support for the FT.ALIASLIST command (Query Engine 8.10), which
lists all aliases associated with a given index.

- Add ALIASLIST constant and SearchCommandBuilder.AliasList(index)
- Expose AliasList / AliasListAsync on ISearchCommands and
  ISearchCommandsAsync (returning RedisResult[], matching _List/TagVals)
- Register the new public API surface in PublicAPI.Unshipped.txt
- Add sync and async integration tests (guarded to Redis 8.10+)

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 using default effort 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 d536e0d. Configure here.

string[] Aliases() => ft.AliasList(index).Select(a => a.ToString()).OrderBy(a => a).ToArray();

// An existing index with no aliases returns an empty collection, not an error.
Assert.Empty(ft.AliasList(index));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AliasList tests miss CROSSSLOT skip

Low Severity

TestAliasList and TestAliasListAsync call AliasList / AliasListAsync before any alias-command environment probe. On legacy cluster setups that respond with CROSSSLOT for alias-related FT commands, those calls fail the test instead of skipping like AliasAddOrSkipOnCrossSlot does for FT.ALIASADD.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d536e0d. Configure here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants