File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
packages/search/lib/commands Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { strict as assert } from 'node:assert' ;
2
2
import testUtils , { GLOBAL } from '../test-utils' ;
3
- import INFO from './INFO' ;
3
+ import INFO , { InfoReply } from './INFO' ;
4
4
import { SCHEMA_FIELD_TYPE } from './CREATE' ;
5
5
6
6
describe ( 'INFO' , ( ) => {
@@ -15,8 +15,10 @@ describe('INFO', () => {
15
15
await client . ft . create ( 'index' , {
16
16
field : SCHEMA_FIELD_TYPE . TEXT
17
17
} ) ;
18
+ const ret = await client . ft . info ( 'index' ) ;
19
+ assert . deepEqual ( ret . stopWords , undefined ) ;
18
20
assert . deepEqual (
19
- await client . ft . info ( 'index' ) ,
21
+ ret ,
20
22
{
21
23
indexName : 'index' ,
22
24
indexOptions : [ ] ,
@@ -99,8 +101,8 @@ describe('INFO', () => {
99
101
indexCapacity : 128 ,
100
102
indexTotal : 0
101
103
} ,
102
- stopWords : undefined
103
104
}
104
105
) ;
106
+
105
107
} , GLOBAL . SERVERS . OPEN ) ;
106
108
} ) ;
Original file line number Diff line number Diff line change @@ -60,16 +60,14 @@ export interface InfoReply {
60
60
indexCapacity : NumberReply ;
61
61
indexTotal : NumberReply ;
62
62
} ;
63
- stopWords : ArrayReply < BlobStringReply | NullReply > | undefined ;
63
+ stopWords ? : ArrayReply < BlobStringReply | NullReply > ;
64
64
}
65
65
66
66
function transformV2Reply ( reply : Array < any > , preserve ?: any , typeMapping ?: TypeMapping ) : InfoReply {
67
67
const myTransformFunc = createTransformTuplesReplyFunc < SimpleStringReply > ( preserve , typeMapping ) ;
68
68
69
69
const ret = { } as unknown as InfoReply ;
70
70
71
- ret . stopWords = undefined ;
72
-
73
71
for ( let i = 0 ; i < reply . length ; i += 2 ) {
74
72
const key = reply [ i ] . toString ( ) ;
75
73
You can’t perform that action at this time.
0 commit comments