Skip to content

Commit b58833b

Browse files
fix #2569 - fix @redis/search README
1 parent a7d5bc7 commit b58833b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/search/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For complete examples, see [`search-hashes.js`](https://github.com/redis/node-re
1212

1313
#### Creating an Index
1414

15-
Before we can perform any searches, we need to tell RediSearch how to index our data, and which Redis keys to find that data in. The [FT.CREATE](https://oss.redis.com/redisearch/Commands/#ftcreate) command creates a RediSearch index. Here's how to use it to create an index we'll call `idx:animals` where we want to index hashes containing `name`, `species` and `age` fields, and whose key names in Redis begin with the prefix `noderedis:animals`:
15+
Before we can perform any searches, we need to tell RediSearch how to index our data, and which Redis keys to find that data in. The [FT.CREATE](https://redis.io/commands/ft.create) command creates a RediSearch index. Here's how to use it to create an index we'll call `idx:animals` where we want to index hashes containing `name`, `species` and `age` fields, and whose key names in Redis begin with the prefix `noderedis:animals`:
1616

1717
```javascript
1818
await client.ft.create('idx:animals', {
@@ -28,11 +28,11 @@ await client.ft.create('idx:animals', {
2828
});
2929
```
3030

31-
See the [`FT.CREATE` documentation](https://oss.redis.com/redisearch/Commands/#ftcreate) for information about the different field types and additional options.
31+
See the [`FT.CREATE` documentation](https://redis.io/commands/ft.create/#description) for information about the different field types and additional options.
3232

3333
#### Querying the Index
3434

35-
Once we've created an index, and added some data to Redis hashes whose keys begin with the prefix `noderedis:animals`, we can start writing some search queries. RediSearch supports a rich query syntax for full-text search, faceted search, aggregation and more. Check out the [`FT.SEARCH` documentation](https://oss.redis.com/redisearch/Commands/#ftsearch) and the [query syntax reference](https://oss.redis.com/redisearch/Query_Syntax/) for more information.
35+
Once we've created an index, and added some data to Redis hashes whose keys begin with the prefix `noderedis:animals`, we can start writing some search queries. RediSearch supports a rich query syntax for full-text search, faceted search, aggregation and more. Check out the [`FT.SEARCH` documentation](https://redis.io/commands/ft.search) and the [query syntax reference](https://redis.io/docs/interact/search-and-query/query) for more information.
3636

3737
Let's write a query to find all the animals where the `species` field has the value `dog`:
3838

@@ -112,7 +112,7 @@ Note that we're using JSON Path to specify where the fields to index are in our
112112

113113
Now we have an index and some data stored as JSON documents in Redis (see the [JSON package documentation](https://github.com/redis/node-redis/tree/master/packages/json) for examples of how to store JSON), we can write some queries...
114114

115-
We'll use the [RediSearch query language](https://oss.redis.com/redisearch/Query_Syntax/) and [`FT.SEARCH`](https://oss.redis.com/redisearch/Commands/#ftsearch) command. Here's a query to find users under the age of 30:
115+
We'll use the [RediSearch query language](https://redis.io/docs/interact/search-and-query/query) and [`FT.SEARCH`](https://redis.io/commands/ft.search) command. Here's a query to find users under the age of 30:
116116

117117
```javascript
118118
await client.ft.search('idx:users', '@age:[0 30]');

0 commit comments

Comments
 (0)