FT.AGGREGATE _ LOAD * is not supported
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.
Very annoying lol +1
Thanks for the workaround, thought I was lowkey doomed
Upvote. Very annoying, even more with complex queries