Skip to content

Commit f7a6fae

Browse files
committed
fix tests
1 parent 5ce36c6 commit f7a6fae

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

redisinsight/ui/src/utils/index/generateFtCreateCommand.spec.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ describe('generateFtCreateCommand', () => {
3232
dataContent: SampleDataContent.CONTENT_RECOMMENDATIONS,
3333
})
3434

35-
expect(result).toBe(`FT.CREATE idx:movies ON JSON PREFIX 1 "movie:" SCHEMA
36-
$.title AS title TEXT
37-
$.genres[*] AS genres TAG
38-
$.plot AS plot TEXT
39-
$.year AS year NUMERIC
40-
$.embedding AS embedding VECTOR FLAT 6
41-
TYPE FLOAT32
42-
DIM 8
43-
DISTANCE_METRIC COSINE`)
35+
expect(result).toBe(`FT.CREATE idx:movies
36+
ON JSON
37+
PREFIX 1 "movie:"
38+
SCHEMA
39+
$.title AS title TEXT
40+
$.genres[*] AS genres TAG
41+
$.plot AS plot TEXT
42+
$.year AS year NUMERIC
43+
$.embedding AS embedding VECTOR FLAT 6
44+
TYPE FLOAT32
45+
DIM 8
46+
DISTANCE_METRIC COSINE`)
4447
})
4548
})

redisinsight/ui/src/utils/index/generateFtCreateCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const generateFtCreateCommand = ({
1717
if (dataContent === SampleDataContent.CONTENT_RECOMMENDATIONS) {
1818
return `FT.CREATE ${indexName}
1919
ON JSON
20-
PREFIX 1 "movie:"
20+
PREFIX 1 "movie:"
2121
SCHEMA
2222
$.title AS title TEXT
2323
$.genres[*] AS genres TAG

0 commit comments

Comments
 (0)