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 does not aggregate when filtering tags #2764

Open
kvamsij opened this issue May 20, 2024 · 0 comments
Open

ft.aggregate does not aggregate when filtering tags #2764

kvamsij opened this issue May 20, 2024 · 0 comments
Labels

Comments

@kvamsij
Copy link

kvamsij commented May 20, 2024

Description

flavour is a tag and it is array of strings. This how I declared in schema ( $.sfl.[] as flavour TAG SEPARATOR ','). I can see the results without aggregation step but with aggregation i get an error message Value was not found in result
` const { results, total } = await client.ft.AGGREGATE(redisIndex, '
', {
LOAD: ['@dataset', '@region', '@Country', '@flavour'],
STEPS: [
{
type: AggregateSteps.FILTER,
expression: '@dataset == 1'
},
{
type: AggregateSteps.FILTER,
expression: '@region == "US"'
},
{
type: AggregateSteps.FILTER,
expression: '@flavour == "Chocolate"'
},
{
type: AggregateSteps.GROUPBY,
properties: ['@Country'],
REDUCE: [
{
type: AggregateGroupByReducers.COUNT,
AS: 'count'
}
]
}

        ]
    })`

Node.js Version

v20.12.2

Redis Server Version

redis_version:7.2.4

Node Redis Version

"redis": "^4.6.13"

Platform

linux

Logs

error message [ErrorReply: Value was not found in result (not a hard error)]

Results without aggregate step
{
  results: [
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'Canada',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    },
    [Object: null prototype] {
      dataset: '1',
      region: 'US',
      country: 'United States',
      flavour: 'Chocolate'
    }
  ],
  total: 11
}
@kvamsij kvamsij added the Bug label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant