Skip to content

Commit 29804fc

Browse files
committed
Merge branch 'release-rs-fuya-fuya' into DOC-4418
2 parents 2c2b943 + 0c9b912 commit 29804fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1610
-229
lines changed

content/develop/connect/clients/dotnet.md

Lines changed: 38 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -188,111 +188,63 @@ for more information.
188188

189189
## Example: Indexing and querying JSON documents
190190

191-
This example shows how to convert Redis search results to JSON format using `NRedisStack`.
191+
This example shows how to create a
192+
[search index]({{< relref "/develop/interact/search-and-query/indexing" >}})
193+
for [JSON]({{< relref "/develop/data-types/json" >}}) data and
194+
run queries against the index.
192195

193196
Make sure that you have Redis Stack and `NRedisStack` installed.
194197

195-
Import dependencies and connect to the Redis server:
198+
Start by importing dependencies:
196199

197-
```csharp
198-
using NRedisStack;
199-
using NRedisStack.RedisStackCommands;
200-
using NRedisStack.Search;
201-
using NRedisStack.Search.Aggregation;
202-
using NRedisStack.Search.Literals.Enums;
203-
using StackExchange.Redis;
200+
{{< clients-example cs_home_json import >}}
201+
{{< /clients-example >}}
204202

205-
// ...
203+
Connect to the database:
206204

207-
ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost");
208-
```
205+
{{< clients-example cs_home_json connect >}}
206+
{{< /clients-example >}}
209207

210-
Get a reference to the database and for search and JSON commands.
208+
Create some test data to add to the database:
211209

212-
```csharp
213-
var db = redis.GetDatabase();
214-
var ft = db.FT();
215-
var json = db.JSON();
216-
```
210+
{{< clients-example cs_home_json create_data >}}
211+
{{< /clients-example >}}
217212

218-
Let's create some test data to add to your database.
213+
Create an index. In this example, only JSON documents with the key prefix `user:` are indexed. For more information, see [Query syntax]({{< relref "/develop/interact/search-and-query/query/" >}}).
219214

220-
```csharp
221-
var user1 = new {
222-
name = "Paul John",
223-
email = "[email protected]",
224-
age = 42,
225-
city = "London"
226-
};
215+
{{< clients-example cs_home_json make_index >}}
216+
{{< /clients-example >}}
227217

228-
var user2 = new {
229-
name = "Eden Zamir",
230-
email = "[email protected]",
231-
age = 29,
232-
city = "Tel Aviv"
233-
};
218+
Add the three sets of user data to the database as
219+
[JSON]({{< relref "/develop/data-types/json" >}}) objects.
220+
If you use keys with the `user:` prefix then Redis will index the
221+
objects automatically as you add them:
234222

235-
var user3 = new {
236-
name = "Paul Zamir",
237-
email = "[email protected]",
238-
age = 35,
239-
city = "Tel Aviv"
240-
};
241-
```
223+
{{< clients-example cs_home_json add_data >}}
224+
{{< /clients-example >}}
242225

243-
Create an index. In this example, all JSON documents with the key prefix `user:` are indexed. For more information, see [Query syntax]({{< relref "/develop/interact/search-and-query/query/" >}}).
226+
You can now use the index to search the JSON objects. The
227+
[query]({{< relref "/develop/interact/search-and-query/query" >}})
228+
below searches for objects that have the text "Paul" in any field
229+
and have an `age` value in the range 30 to 40:
244230

245-
```csharp
246-
var schema = new Schema()
247-
.AddTextField(new FieldName("$.name", "name"))
248-
.AddTagField(new FieldName("$.city", "city"))
249-
.AddNumericField(new FieldName("$.age", "age"));
250-
251-
ft.Create(
252-
"idx:users",
253-
new FTCreateParams().On(IndexDataType.JSON).Prefix("user:"),
254-
schema);
255-
```
231+
{{< clients-example cs_home_json query1 >}}
232+
{{< /clients-example >}}
256233

257-
Use [`JSON.SET`]({{< baseurl >}}/commands/json.set/) to set each user value at the specified path.
234+
Specify query options to return only the `city` field:
258235

259-
```csharp
260-
json.Set("user:1", "$", user1);
261-
json.Set("user:2", "$", user2);
262-
json.Set("user:3", "$", user3);
263-
```
264-
265-
Let's find user `Paul` and filter the results by age.
266-
267-
```csharp
268-
var res = ft.Search("idx:users", new Query("Paul @age:[30 40]")).Documents.Select(x => x["json"]);
269-
Console.WriteLine(string.Join("\n", res));
270-
// Prints: {"name":"Paul Zamir","email":"[email protected]","age":35,"city":"Tel Aviv"}
271-
```
272-
273-
Return only the `city` field.
236+
{{< clients-example cs_home_json query2 >}}
237+
{{< /clients-example >}}
274238

275-
```csharp
276-
var res_cities = ft.Search("idx:users", new Query("Paul").ReturnFields(new FieldName("$.city", "city"))).Documents.Select(x => x["city"]);
277-
Console.WriteLine(string.Join(", ", res_cities));
278-
// Prints: London, Tel Aviv
279-
```
239+
Use an
240+
[aggregation query]({{< relref "/develop/interact/search-and-query/query/aggregation" >}})
241+
to count all users in each city.
280242

281-
Count all users in the same city.
282-
283-
```csharp
284-
var request = new AggregationRequest("*").GroupBy("@city", Reducers.Count().As("count"));
285-
var result = ft.Aggregate("idx:users", request);
243+
{{< clients-example cs_home_json query3 >}}
244+
{{< /clients-example >}}
286245

287-
for (var i=0; i<result.TotalResults; i++)
288-
{
289-
var row = result.GetRow(i);
290-
Console.WriteLine($"{row["city"]} - {row["count"]}");
291-
}
292-
// Prints:
293-
// London - 1
294-
// Tel Aviv - 2
295-
```
246+
See the [Redis query engine]({{< relref "/develop/interact/search-and-query" >}}) docs
247+
for a full description of all query features with examples.
296248

297249
## Learn more
298250

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
1. On the **Databases** screen, select **Quick database**.
2+
3+
{{<image filename="images/rs/screenshots/databases/db-screen.png" alt="Select Quick database on the Databases screen." >}}
4+
5+
1. Enter 12000 for the **Port**.
6+
7+
If port 12000 is not available, enter any available port number between 10000 to 19999 or leave it blank to let the cluster assign a port number for you. You will use this port number to connect to the database.
8+
9+
{{<image filename="images/rs/screenshots/databases/quick-db-7-8-2.png" alt="Create a quick database." >}}
10+
11+
1. Select **Create** to create your database.
12+
13+
When you see **Database active** appear on the database configuration screen, the database is activated and ready for you to use.
14+
15+
{{<image filename="images/rs/icons/db-active-icon.png" width="150px" alt="Database active icon." >}}
16+
17+
18+
You now have a Redis database!

content/operate/kubernetes/release-notes/7-4-6-releases/7-4-6-2-october24.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This is a maintenance release to support [Redis Enterprise Software version 7.4.
1616

1717
## Downloads
1818

19-
- **Redis Enterprise**: `redislabs/redis:7.4.102`
19+
- **Redis Enterprise**: `redislabs/redis:7.4.6-102`
2020
- **Operator**: `redislabs/operator:7.4.6-2`
2121
- **Services Rigger**: `redislabs/k8s-controller:7.4.6-2`
2222

content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ In the Redis Enterprise Cluster Manager UI, follow these steps to add modules to
3030

3131
1. In the **Capabilities** section, select one or more capabilities:
3232

33-
{{<image filename="images/rs/screenshots/databases/quick-db-capabilities.png" alt="Select which capabilities to add to your database.">}}
33+
{{<image filename="images/rs/screenshots/databases/quick-db-capabilities-7-8-2.png" alt="Select which capabilities to add to your database.">}}
3434

3535
{{<note>}}
3636
You cannot use RediSearch 1.x and RediSearch 2.x in the same database.

0 commit comments

Comments
 (0)