Skip to content

Commit 0c45cd2

Browse files
committed
Merge branch 'main' into DOC-3077
2 parents 0a215c5 + 4834d38 commit 0c45cd2

File tree

22 files changed

+581
-57
lines changed

22 files changed

+581
-57
lines changed

build/version_archiver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def inject_url_frontmatter(self):
108108
file_path = os.path.join(root, file)
109109

110110
# Read the file line by line
111-
with open(file_path, "r", encoding="utf-8") as f:
111+
with open(file_path, "r", encoding="utf-8", errors="ignore") as f:
112112
lines = f.readlines()
113113

114114
# Find the positions of the first and second '---' markers
@@ -155,7 +155,7 @@ def inject_url_frontmatter(self):
155155
url = f"url: '/{base_url}/{self.new_version}/{relative_path}/'"
156156

157157
else:
158-
f = file.strip(".md")
158+
f = file.removesuffix(".md")
159159
if relative_path == ".":
160160
url = f"url: '/{base_url}/{self.new_version}/{f}/'"
161161
else:

content/develop/ai/redisvl/0.6.0/install.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: Install RedisVL
3-
linkTitle: Install
4-
title: Install
2+
linkTitle: Install RedisVL
3+
title: Install RedisVL
54
weight: 2
65
aliases:
76
- /integrate/redisvl/install

content/develop/ai/redisvl/0.7.0/install.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: Install RedisVL
3-
linkTitle: Install
4-
title: Install
2+
linkTitle: Install RedisVL
3+
title: Install RedisVL
54
weight: 2
65
aliases:
76
- /integrate/redisvl/install

content/develop/ai/redisvl/0.8.0/install.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: Install RedisVL
3-
linkTitle: Install
4-
title: Install
2+
linkTitle: Install RedisVL
3+
title: Install RedisVL
54
weight: 2
65
aliases:
76
- /integrate/redisvl/install

content/develop/ai/redisvl/0.8.1/install.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: Install RedisVL
3-
linkTitle: Install
4-
title: Install
2+
linkTitle: Install RedisVL
3+
title: Install RedisVL
54
weight: 2
65
aliases:
76
- /integrate/redisvl/install

content/develop/ai/redisvl/0.9.0/install.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: Install RedisVL
3-
linkTitle: Install
4-
title: Install
2+
linkTitle: Install RedisVL
3+
title: Install RedisVL
54
weight: 2
65
aliases:
76
- /integrate/redisvl/install

content/develop/ai/redisvl/0.9.1/install.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: Install RedisVL
3-
linkTitle: Install
4-
title: Install
2+
linkTitle: Install RedisVL
3+
title: Install RedisVL
54
weight: 2
65
aliases:
76
- /integrate/redisvl/install

content/develop/ai/redisvl/install.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: Install RedisVL
3-
linkTitle: Install
4-
title: Install
2+
linkTitle: Install RedisVL
3+
title: Install RedisVL
54
weight: 2
65
aliases:
76
- /integrate/redisvl/install

content/develop/clients/jedis/_index.md

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,38 +58,31 @@ To include `Jedis` as a dependency in your application, edit the dependency file
5858

5959
## Connect and test
6060

61-
The following code opens a basic connection to a local Redis server
62-
and closes it after use.
61+
Add the following imports to your source file:
6362

64-
```java
65-
package org.example;
66-
import redis.clients.jedis.UnifiedJedis;
63+
{{< clients-example set="landing" step="import" lang_filter="Java-Sync" >}}
64+
{{< /clients-example >}}
6765

68-
public class Main {
69-
public static void main(String[] args) {
70-
UnifiedJedis jedis = new UnifiedJedis("redis://localhost:6379");
66+
Connect to localhost on port 6379:
7167

72-
// Code that interacts with Redis...
73-
74-
jedis.close();
75-
}
76-
}
77-
```
68+
{{< clients-example set="landing" step="connect" lang_filter="Java-Sync" >}}
69+
{{< /clients-example >}}
7870

7971
After you have connected, you can check the connection by storing and
80-
retrieving a simple string value:
72+
retrieving a simple [string]({{< relref "/develop/data-types/strings" >}}) value:
73+
74+
{{< clients-example set="landing" step="set_get_string" lang_filter="Java-Sync" >}}
75+
{{< /clients-example >}}
8176

82-
```java
83-
...
77+
Store and retrieve a [hash]({{< relref "/develop/data-types/hashes" >}}):
8478

85-
String res1 = jedis.set("bike:1", "Deimos");
86-
System.out.println(res1); // OK
79+
{{< clients-example set="landing" step="set_get_hash" lang_filter="Java-Sync" >}}
80+
{{< /clients-example >}}
8781

88-
String res2 = jedis.get("bike:1");
89-
System.out.println(res2); // Deimos
82+
Close the connection when you're done:
9083

91-
...
92-
```
84+
{{< clients-example set="landing" step="close" lang_filter="Java-Sync" >}}
85+
{{< /clients-example >}}
9386

9487
## More information
9588

content/develop/clients/redis-py/queryjson.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ to learn more about the available connection options.
6464
{{< clients-example py_home_json connect >}}
6565
{{< /clients-example >}}
6666

67+
The example uses an index called `idx:users` for JSON documents and adds
68+
some JSON documents with the `user:` key prefix. To avoid errors, first
69+
delete any existing index or documents whose names that might
70+
conflict with the example:
71+
72+
{{< clients-example py_home_json cleanup_json >}}
73+
{{< /clients-example >}}
74+
6775
Create an index for the JSON data. The code below specifies that only JSON documents with
6876
the key prefix `user:` are indexed. For more information, see
6977
[Query syntax]({{< relref "/develop/ai/search-and-query/query/" >}}).
@@ -111,9 +119,16 @@ need to specify some slightly different options.
111119
When you create the schema for a hash index, you don't need to
112120
add aliases for the fields, since you use the basic names to access
113121
the fields anyway. Also, you must use `HASH` for the `IndexType`
114-
when you create the index. The code below shows these changes with
115-
a new index called `hash-idx:users`, which is otherwise the same as
116-
the `idx:users` index used for JSON documents in the previous examples.
122+
when you create the index.
123+
124+
First delete any existing index or documents
125+
whose names might conflict with the hash example:
126+
127+
{{< clients-example py_home_json cleanup_hash >}}
128+
{{< /clients-example >}}
129+
130+
Create a new index called `hash-idx:users`, which is otherwise the same as
131+
the `idx:users` index used for JSON documents in the previous examples:
117132

118133
{{< clients-example py_home_json make_hash_index >}}
119134
{{< /clients-example >}}

0 commit comments

Comments
 (0)