Skip to content

Commit 5e9fea1

Browse files
authored
Update Redis version to 8.0.1-pre (#2952)
> FT.AGGREGATE returns an array reply where each row is an array reply and represents a single aggregate result. > The integer reply at position 1 does not represent a valid value. We now calculate the result length bazed on the number of results instead of the integer reply at pos 1
1 parent bb7845d commit 5e9fea1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ on:
77
- v4.0
88
- v5
99
paths-ignore:
10-
- '**/*.md'
10+
- "**/*.md"
1111
pull_request:
1212
branches:
1313
- master
1414
- v4.0
1515
- v5
1616
paths-ignore:
17-
- '**/*.md'
17+
- "**/*.md"
1818
jobs:
1919
tests:
2020
runs-on: ubuntu-latest
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
node-version: [ '18', '20', '22' ]
25-
redis-version: [ 'rs-7.2.0-v13', 'rs-7.4.0-v1', '8.0-RC2-pre' ]
24+
node-version: ["18", "20", "22"]
25+
redis-version: ["rs-7.2.0-v13", "rs-7.4.0-v1", "8.0.1-pre"]
2626
steps:
2727
- uses: actions/checkout@v4
2828
with:

packages/search/lib/commands/AGGREGATE.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export default {
156156
}
157157

158158
return {
159-
total: Number(rawReply[0]),
159+
total: results.length,
160160
results
161161
};
162162
},

packages/search/lib/commands/PROFILE_AGGREGATE.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe('PROFILE AGGREGATE', () => {
7373
const normalizeObject = obj => JSON.parse(JSON.stringify(obj));
7474
const res = await client.ft.profileAggregate('index', '*');
7575
const normalizedRes = normalizeObject(res);
76-
assert.equal(normalizedRes.results.total, 1);
76+
assert.equal(normalizedRes.results.total, 2);
7777

7878
assert.ok(Array.isArray(normalizedRes.profile));
7979
assert.equal(normalizedRes.profile[0][0], 'Total profile time');

0 commit comments

Comments
 (0)