Skip to content

feat(search): add FT.ALIASLIST command - #3351

Merged
nkaradzhov merged 3 commits into
redis:masterfrom
nkaradzhov:ft-aliaslist
Jul 28, 2026
Merged

nkaradzhov merged 3 commits into
redis:masterfrom
nkaradzhov:ft-aliaslist

Conversation

@nkaradzhov

@nkaradzhov nkaradzhov commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

This pull request adds the FT.ALIASLIST command to @redis/search. Given an index name, it returns all aliases currently associated with that index — making alias discovery a first-class, read-only Query Engine API instead of relying on the FT.INFO workaround. Available from RediSearch 8.10.0.

The command sends the fixed wire shape FT.ALIASLIST index with no optional arguments. It is read-only and keyless (the index argument is a Query Engine identifier, not a Redis key), so it runs on replicas and executes on an arbitrary shard in cluster mode with no fanout. The reply is an unordered collection of alias name strings: RESP2 returns an array of bulk strings, RESP3 returns a set — both surfaced via the client's normal RESP handling. An existing index with no aliases yields an empty collection rather than an error.

Behavior notes callers should be aware of: the server resolves the argument with no alias lookup, so passing an alias name (or a missing index) fails with SEARCH_INDEX_NOT_FOUND Index not found: <name>; permission failures surface as NOPERM. The client adds no validation and propagates server errors unchanged. Result ordering is not part of the contract and must not be relied upon.

🤖 Generated with Claude Code


Note

Low Risk
Additive read-only search client command with no auth or data-path changes; behavior is delegated to RediSearch 8.10+.

Overview
Adds FT.ALIASLIST to @redis/search so callers can list aliases for an index via client.ft.aliasList / ALIASLIST, instead of inferring them from FT.INFO.

The new command module emits FT.ALIASLIST index, is marked read-only and not keyed, and types the reply as a RESP2 array or RESP3 set of alias strings. Integration tests cover argument encoding, empty vs populated alias lists (order-agnostic), and SEARCH_INDEX_NOT_FOUND for a missing index, gated on Redis 8.10+.

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

nkaradzhov and others added 3 commits July 22, 2026 13:13
Add the FT.ALIASLIST command to @redis/search. Given an index name, it
returns all aliases currently associated with that index, making alias
discovery a first-class read-only API instead of relying on FT.INFO.

The command is read-only and keyless. The reply is an unordered collection
of alias strings: RESP2 array, RESP3 set. An existing index with no aliases
yields an empty collection. The client adds no validation and propagates
server errors (SEARCH_INDEX_NOT_FOUND, NOPERM) unchanged. Available from
RediSearch 8.10.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a rejection test asserting the SEARCH_INDEX_NOT_FOUND error prefix is
propagated unchanged for a missing index, per the command's error contract.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gate the FT.ALIASLIST integration tests with minimumDockerVersion [8, 10]
so pre-8.10 CI matrix tags skip instead of failing with 'unknown command'.
Pipeline test setup via Promise.all to match the sibling alias-command
specs, and drop the non-conventional 'Read-only'/version prose from the
registry JSDoc.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nkaradzhov
nkaradzhov requested a review from PavelPashov July 22, 2026 10:51
@nkaradzhov
nkaradzhov merged commit b6f4be6 into redis:master Jul 28, 2026
34 of 37 checks passed
@nkaradzhov
nkaradzhov deleted the ft-aliaslist branch July 28, 2026 16:58
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