Skip to content

Commit 21d8f0e

Browse files
authored
docs(search): update SchemaFieldTypes to SCHEMA_FIELD_TYPE for redis@5.x (#2992)
1 parent 2bb515e commit 21d8f0e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/search/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ Before we can perform any searches, we need to tell RediSearch how to index our
1919
```javascript
2020
await client.ft.create('idx:animals', {
2121
name: {
22-
type: SchemaFieldTypes.TEXT,
22+
type: SCHEMA_FIELD_TYPE.TEXT,
2323
SORTABLE: true
2424
},
25-
species: SchemaFieldTypes.TAG,
26-
age: SchemaFieldTypes.NUMERIC
25+
species: SCHEMA_FIELD_TYPE.TAG,
26+
age: SCHEMA_FIELD_TYPE.NUMERIC
2727
}, {
2828
ON: 'HASH',
2929
PREFIX: 'noderedis:animals'
@@ -91,15 +91,15 @@ One way we might choose to index these documents is as follows:
9191
```javascript
9292
await client.ft.create('idx:users', {
9393
'$.name': {
94-
type: SchemaFieldTypes.TEXT,
94+
type: SCHEMA_FIELD_TYPE.TEXT,
9595
SORTABLE: 'UNF'
9696
},
9797
'$.age': {
98-
type: SchemaFieldTypes.NUMERIC,
98+
type: SCHEMA_FIELD_TYPE.NUMERIC,
9999
AS: 'age'
100100
},
101101
'$.coins': {
102-
type: SchemaFieldTypes.NUMERIC,
102+
type: SCHEMA_FIELD_TYPE.NUMERIC,
103103
AS: 'coins'
104104
}
105105
}, {

0 commit comments

Comments
 (0)