redis / redis/node-redis

FT.AGGREGATE _ LOAD * is not supported

Open
#2,726 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
TypeScript
Stars
17.6k
Forks
2k
Avg merge
2d 3h
Merged PRs (30d)
40

Description

Description

I'm not sure if it counts as a bug or a half-implemented feature...

https://redis.io/commands/ft.aggregate/
If * is used as nargs, all attributes in a document are loaded.

I assume it is not supported – couldn't find any mention in issues or elsewhere.

Example: FT.AGGREGATE idx:user * LOAD * should return all fields of all indexed "user" documents.

await client.aggregate(`idx:user`, "*", {
  LOAD: "*", // causes TS error, does not work as JS as well
  // TS2345: Argument of type [string, string, {LOAD: "*";}] is not assignable to parameter of type
})

It seems Node-Redis supports only basic named fields like LOAD: "@email". It does not support load all functionality which is IMO necessary, for example, to implement cursor-based pagination.

await client.aggregate(`idx:user`, "*", {
  LOAD: "@email", 
}) // works fine
Node.js Version

21.7.1

Redis Server Version

7.2.4

Node Redis Version

7.2.4

Platform

macOS

Logs

No response


Update

As a temporary low-level solution it's possible to:

await client.sendCommand(["FT.AGGREGATE", "idx:user", "*", "LOAD", "*"])

Requires manual reply, manual JSON parsing, etc.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the client.aggregate entry point and compare its LOAD @email handling with the raw sendCommand example for FT.AGGREGATE. Check how LOAD options are typed and serialized; done means LOAD: "*" is accepted by TypeScript and works like the documented Redis command without manual parsing.

Written by the indexing model from the issue text.

Assessment

Tech stack
redis, typescript
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.