Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FT.AGGREGATE prints extra fields #4230

Open
BagritsevichStepan opened this issue Nov 29, 2024 · 0 comments · May be fixed by #4231
Open

FT.AGGREGATE prints extra fields #4230

BagritsevichStepan opened this issue Nov 29, 2024 · 0 comments · May be fixed by #4231
Assignees
Labels
bug Something isn't working

Comments

@BagritsevichStepan
Copy link
Contributor

BagritsevichStepan commented Nov 29, 2024

FT.AGGREGATE sometimes prints extra fields

Initialize:

127.0.0.1:6379> JSON.SET j1 $ '{"a":"1","b":"2","c":"3"}'
OK
127.0.0.1:6379> JSON.SET j2 $ '{"a":"4","b":"5","c":"6"}'
OK
127.0.0.1:6379> JSON.SET j3 $ '{"a":"7","b":"8","c":"9"}'
OK
127.0.0.1:6379> FT.CREATE index ON JSON SCHEMA $.a AS a TEXT SORTABLE $.b AS b TEXT $.c AS c TEXT
OK

Redis:

127.0.0.1:6379> FT.AGGREGATE index "*"
1) (integer) 1
2) (empty array)
3) (empty array)
4) (empty array)
127.0.0.1:6379> FT.AGGREGATE index "*" SORTBY 1 @a
1) (integer) 3
2) 1) "a"
   2) "1"
3) 1) "a"
   2) "4"
4) 1) "a"
   2) "7"

Dragonfly:

127.0.0.1:6379> ft.aggregate index "*"
1) (integer) 3
2) 1) "a"
   2) "\"b\""
   3) "b"
   4) "\"1\""
3) 1) "a"
   2) "\"cc\""
   3) "b"
   4) "\"2\""
4) 1) "a"
   2) "\"ddd\""
   3) "b"
   4) "\"3\""
127.0.0.1:6379> ft.aggregate index "*" SORTBY 1 a
1) (integer) 3
2) 1) "a"
   2) "\"b\""
   3) "b"
   4) "\"1\""
3) 1) "a"
   2) "\"cc\""
   3) "b"
   4) "\"2\""
4) 1) "a"
   2) "\"ddd\""
   3) "b"
   4) "\"3\""
@BagritsevichStepan BagritsevichStepan added the bug Something isn't working label Nov 29, 2024
@BagritsevichStepan BagritsevichStepan self-assigned this Nov 29, 2024
@BagritsevichStepan BagritsevichStepan changed the title FT.AGGREGATE sometimes outputs extra fields FT.AGGREGATE sometimes prints extra fields Nov 29, 2024
BagritsevichStepan added a commit to BagritsevichStepan/dragonfly that referenced this issue Nov 29, 2024
BagritsevichStepan added a commit to BagritsevichStepan/dragonfly that referenced this issue Nov 29, 2024
@BagritsevichStepan BagritsevichStepan changed the title FT.AGGREGATE sometimes prints extra fields FT.AGGREGATE prints extra fields Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant