1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Add support for TIMEOUT in FT.AGGREGATE and FT.SEARCH (#2488)

* #2486: add timeout as optional param in FT.Search

* return timeout from aggregate

* add test case for TIMEOUT in aggregate

* add TIMEOUT option in search file

* add test cases for TIMEOUT option in search file

* uodate search/aggregates to add timeout when it is not undefuned

* update search to add timeout when it is not undefuned

* update test case for AGGREGATE
This commit is contained in:
Nanak
2023-05-21 17:31:17 +05:30
committed by GitHub
parent 67d9c3c46a
commit 8d37c115e6
5 changed files with 26 additions and 0 deletions

View File

@@ -233,6 +233,15 @@ describe('SEARCH', () => {
['FT.SEARCH', 'index', 'query', 'DIALECT', '1']
);
});
it('with TIMEOUT', () => {
assert.deepEqual(
transformArguments('index', 'query', {
TIMEOUT: 5
}),
['FT.SEARCH', 'index', 'query', 'TIMEOUT', '5']
);
});
});
describe('client.ft.search', () => {