Skip to content

Commit d1acd6e

Browse files
committed
Merge branch 'main' into release-rs-fuya-fuya
2 parents 838414b + af06608 commit d1acd6e

File tree

11 files changed

+1153
-32
lines changed

11 files changed

+1153
-32
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: update_command_pages
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
paths:
7+
- data/commands_core.json # run when data/commands_core.json is updated on main
8+
workflow_dispatch: # or run on manual trigger
9+
10+
jobs:
11+
update_command_pages:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
actions: write
17+
steps:
18+
- name: 'Checkout'
19+
uses: 'actions/checkout@v3'
20+
21+
- name: Install dependencies
22+
run: make deps
23+
24+
- name: 'Run build/update_cmds.py script'
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
branch="update_command_pages"
29+
commands_change=false
30+
31+
# check if remote branch already exists
32+
git fetch --all
33+
set +e
34+
git ls-remote --exit-code --heads origin "refs/heads/${branch}"
35+
if [ "$?" -eq 0 ]; then
36+
set -e
37+
# if it does, create local branch off existing remote branch
38+
git checkout -b "${branch}" "origin/${branch}"
39+
git branch --set-upstream-to="origin/${branch}" "${branch}"
40+
git pull
41+
else
42+
set -e
43+
# otherwise, create local branch from main
44+
git checkout -b "${branch}"
45+
fi
46+
47+
python3 build/update_cmds.py
48+
49+
commands_are_different=$(git diff "content/commands/")
50+
51+
if [[ ! -z $commands_are_different ]]; then
52+
commands_change=true
53+
54+
git add "content/commands/"
55+
git config user.email "177626021+redisdocsapp[bot]@users.noreply.github.com"
56+
git config user.name "redisdocsapp[bot]"
57+
git commit -m "Update content/commands/"
58+
fi
59+
60+
if [ "$commands_change" = true ] ; then
61+
git push origin "${branch}"
62+
63+
# If a pr is not already open, create one
64+
set +e
65+
gh search prs -R redis/docs --state open --match title "update command pages" | grep -q "update command pages"
66+
if [ "$?" -eq 1 ]; then
67+
set -e
68+
gh pr create \
69+
--body "update command pages" \
70+
--title "update command pages" \
71+
--head "$branch" \
72+
--base "main"
73+
fi
74+
fi

content/commands/ft.create/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,6 @@ author_id TAG SORTABLE author_ids TAG title TEXT name TEXT
431431
{{< / highlight >}}
432432

433433
In this example, keys for author data use the key pattern `author:details:<id>` while keys for book data use the pattern `book:details:<id>`.
434-
</details>
435-
436-
<details open>
437-
<summary><b>Index a JSON document using a JSON Path expression</b></summary>
438434

439435
Index authors whose names start with G.
440436

@@ -451,10 +447,14 @@ Index only books that have a subtitle.
451447
Index books that have a "categories" attribute where each category is separated by a `;` character.
452448

453449
{{< highlight bash >}}
454-
127.0.0.1:6379> FT.CREATE books-idx ON HASH PREFIX 1 book:details FILTER SCHEMA title TEXT categories TAG SEPARATOR ";"
450+
127.0.0.1:6379> FT.CREATE books-idx ON HASH PREFIX 1 book:details SCHEMA title TEXT categories TAG SEPARATOR ";"
455451
{{< / highlight >}}
452+
</details>
453+
454+
<details open>
455+
<summary><b>Index a JSON document using a JSON Path expression</b></summary>
456456

457-
Index a JSON document using a JSON Path expression.
457+
The following example uses data similar to the hash examples above but uses JSON instead.
458458

459459
{{< highlight bash >}}
460460
127.0.0.1:6379> FT.CREATE idx ON JSON SCHEMA $.title AS title TEXT $.categories AS categories TAG

content/develop/connect/clients/_index.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ weight: 45
1616
---
1717

1818
Use the Redis client libraries to connect to Redis servers from
19-
your own code. We support client libraries
20-
for five main languages:
21-
- [Python]({{< relref "/develop/connect/clients/python" >}})
22-
- [C#/.NET]({{< relref "/develop/connect/clients/dotnet" >}})
23-
- [Node.js]({{< relref "/develop/connect/clients/nodejs" >}})
24-
- [Java]({{< relref "/develop/connect/clients/java" >}})
25-
- [Go]({{< relref "/develop/connect/clients/go" >}})
19+
your own code. We document the following client libraries
20+
for six main languages:
21+
22+
| Language | Client name | Docs | Supported |
23+
| :-- | :-- | :-- | :-- |
24+
| [Python](https://www.python.org/) | [`redis-py`](https://github.com/redis/redis-py) |[Redis Python library guide]({{< relref "/develop/connect/clients/python/redis-py" >}}) | Yes |
25+
| [Python](https://www.python.org/) | [`RedisVL`](https://github.com/redis/redis-vl-python) |[RedisVL guide]({{< relref "/integrate/redisvl" >}}) | Yes
26+
| [C#/.NET](https://learn.microsoft.com/en-us/dotnet/csharp/) | [`NRedisStack`](https://github.com/redis/NRedisStack) |[C#/.NET guide]({{< relref "/develop/connect/clients/dotnet" >}}) | Yes |
27+
| [Node.js](https://nodejs.org/en) | [`node-redis`](https://github.com/redis/node-redis) | [Node.js guide]({{< relref "/develop/connect/clients/nodejs" >}}) | Yes |
28+
| [Java](https://www.java.com/en/) | [`Jedis`](https://github.com/redis/jedis) | [Jedis guide]({{< relref "/develop/connect/clients/java/jedis" >}}) | Yes |
29+
| [Java](https://www.java.com/en/) | [`Lettuce`](https://github.com/redis/lettuce) | [Lettuce guide]({{< relref "/develop/connect/clients/java/lettuce" >}}) | Yes |
30+
| [Go](https://go.dev/) | [`go-redis`](https://github.com/redis/go-redis) | [Go guide]({{< relref "/develop/connect/clients/go" >}}) | Yes |
31+
| [PHP](https://www.php.net/)| [`Predis`](https://github.com/predis/predis) | [PHP guide]({{< relref "/develop/connect/clients/php" >}}) | No |
2632

2733
We also provide several higher-level
2834
[object mapping (OM)]({{< relref "/develop/connect/clients/om-clients" >}})
@@ -34,13 +40,12 @@ libraries for [Python]({{< relref "/integrate/redisom-for-python" >}}),
3440
## Community-supported clients
3541

3642
The table below shows the recommended third-party client libraries for languages that
37-
Redis does not support directly:
43+
Redis does not document directly:
3844

3945
| Language | Client name | Github | Docs |
4046
| :-- | :-- | :-- | :-- |
4147
| C | hiredis | https://github.com/redis/hiredis | https://github.com/redis/hiredis |
4248
| [PHP](https://www.php.net/) | PhpRedis extension | https://github.com/phpredis/phpredis | https://github.com/phpredis/phpredis/blob/develop/README.md |
43-
| [PHP](https://www.php.net/) | Predis library | https://github.com/predis/predis | https://github.com/predis/predis/wiki |
4449
| [Ruby](https://www.ruby-lang.org/en/) | redis-rb | https://github.com/redis/redis-rb | https://rubydoc.info/gems/redis |
4550
| [Rust](https://www.rust-lang.org/) | redis-rs | https://github.com/redis-rs/redis-rs | https://docs.rs/redis/latest/redis/ |
4651
| [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Boost.Redis | https://github.com/boostorg/redis | https://www.boost.org/doc/libs/develop/libs/redis/doc/html/index.html |

content/develop/connect/clients/om-clients/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description: Object-Mapper libraries for Redis Stack
1313
linkTitle: Object mapping
1414
stack: true
1515
title: Object-Mapper libraries
16-
weight: 6
16+
weight: 7
1717
---
1818

1919
Redis OM (pronounced *REDiss OHM*) is a library that provides object mapping for Redis. With the help of Redis OM, you can map Redis data types, specifically Hashes and JSON documents, to objects of your preferred programming language or framework. Redis OM relies on Redis Stack's JSON, query, and search features, allowing you to query and search for objects.

0 commit comments

Comments
 (0)