1
0
mirror of https://github.com/redis/node-redis.git synced 2025-12-25 00:40:59 +03:00

Update README.md

This commit is contained in:
Leibale Eidelman
2022-12-26 05:22:01 -05:00
committed by GitHub
parent 5a41d6d60b
commit 9dccd9a678

View File

@@ -18,15 +18,14 @@ Before we can perform any searches, we need to tell RediSearch how to index our
await client.ft.create('idx:animals', {
name: {
type: SchemaFieldTypes.TEXT,
sortable: true
SORTABLE: true
},
species: SchemaFieldTypes.TAG,
age: SchemaFieldTypes.NUMERIC
}, {
ON: 'HASH',
PREFIX: 'noderedis:animals'
}
);
species: SchemaFieldTypes.TAG,
age: SchemaFieldTypes.NUMERIC
}, {
ON: 'HASH',
PREFIX: 'noderedis:animals'
});
```
See the [`FT.CREATE` documentation](https://oss.redis.com/redisearch/Commands/#ftcreate) for information about the different field types and additional options.