Skip to content

Backward compatibility for fields without the "@" sign in the FT.AGGREGATE command #4698

@BagritsevichStepan

Description

@BagritsevichStepan

Starting from v1.21.4, we began printing a warning if a field in the FT.AGGREGATE command is specified without the @ sign because Redis rejects such requests. For example:

> FT.AGGREGATE index "*" GROUPBY 1 field REDUCE ...
search_family.cc:211] bad arguments: Field name 'field' should start with '@'. '@field' is expected

Now, we need to add a flag that allows the use of such fields (without @). If this flag is not set, the request should be rejected.

After the fix if the flag is set:

> FT.AGGREGATE index "*" GROUPBY 1 field REDUCE ...
1) 5  // The request is accepted
...

The problem is in the ParseFieldWithAtSign method, where LOGGING were added. Now depending on the flag we should reject or accept requests without '@' sign

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions