Skip to content

Commit cca1cf5

Browse files
authored
Update index-redis-om-spring-hash.mdx
add detail for the issue [451](redis-developer#451)
1 parent 507a3b6 commit cca1cf5

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Diff for: docs/develop/java/spring/redis-om/index-redis-om-spring-hash.mdx

+14-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ To use Redis OM Spring, open the `pom.xml` file and add the Redis OM Spring Mave
7676
</dependency>
7777
```
7878

79+
> TODO: assume that's a demo from [redis-om-spring](https://github.com/redis/redis-om-spring)
80+
> - this jar cloud have different `unique name` which from groupId、artifactId、version, and this doc was based on once of stage point
81+
> - first, this `unique name` you offered can't be download cause we don't have it's repository node in `pom.xml`
82+
> when I changed it's groupId to `com.redis.om` now, and add repo node whose url is `https://s01.oss.sonatype.org/content/repositories/snapshots/` ,
83+
> it do download a jar, however there is few difference must be confirmed,i'will mark it with `TODO:xxx` below
84+
> - find this jar or rewrite in the latest version is on your turn.
85+
7986
### Gradle
8087

8188
If using gradle add the dependency as follows:
@@ -86,6 +93,8 @@ dependencies {
8693
}
8794
```
8895

96+
> TODO: groupId and version number sholud same with import with maven
97+
8998
## Enabling Redis Repositories
9099

91100
The generated application contains a single Java file, the `@SpringBootApplication` annotated main application.
@@ -144,6 +153,8 @@ services:
144153
To launch the docker compose application, on the command line (or via Docker Desktop), clone this repository
145154
and run (from the root folder):
146155
156+
> TODO: maybe it's better to paste image whole id to ensure the result exactly as your's
157+
147158
```bash
148159
docker compose up
149160
```
@@ -329,6 +340,8 @@ with `com.redis.om.documents.domain.Company:` (which is the default key prefix f
329340
1638336613.156351 [0 172.19.0.1:63396] "FT.CREATE" "UserIdx" "ON" "HASH" "PREFIX" "1" "com.redis.om.hashes.domain.User:" "SCHEMA" "firstName" "AS" "firstName" "TAG" "middleName" "AS" "middleName" "TAG" "lastName" "AS" "lastName" "TAG" "email" "AS" "email" "TAG"
330341
```
331342
343+
> TODO: didn't seen it in my container console , and why this indexId without prefix(package and classname?)
344+
332345
ROMS uses the POJO fields annotated with `@Indexed` or `@Searchable` to build the index schema. In the case of the `User` POJO
333346
we have the fields `firstName`, `middleName`, `lastName` and `email` are all annotated as "indexable",
334347
meaning that we can do exact searches over these fields.
@@ -345,7 +358,7 @@ For each of the `User` POJO we should see a sequence of REDIS commands like:
345358
1638340447.200874 [0 172.19.0.1:63398] "HMSET" "com.redis.om.hashes.domain.User:01FNTB6JWTQHMK7NTEYA8725MP" "_class" "com.redis.om.hashes.domain.User" "email" "[email protected]" "firstName" "Zack" "id" "01FNTB6JWTQHMK7NTEYA8725MP" "lastName" "de la Rocha"
346359
1638340447.203121 [0 172.19.0.1:63398] "SADD" "com.redis.om.hashes.domain.User" "01FNTB6JWTQHMK7NTEYA8725MP"
347360
```
348-
361+
> TODO: executed commands don't exactly like this, executed count and order
349362
First SDR checks whether the object already exists in the Redis SET of primary keys using the `SISMEMBER` command. Then,
350363
a `DEL` is issued to remove the Hash, following by a `HMSET` to write the new or udpated Hash. Finally, the `id` property
351364
of the object is addded to the primary keys set using the `SADD` command.

0 commit comments

Comments
 (0)