Skip to content

Commit cd328a5

Browse files
Add zscan noscores. (#88)
Doc PR for valkey-io/valkey#324 Signed-off-by: Chen Tianjie <[email protected]>
1 parent 569152c commit cd328a5

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

commands/scan.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,25 @@ OK
197197
2) "b"
198198
```
199199

200+
## The NOSCORES option
201+
202+
When using `ZSCAN`, you can use the `NOSCORES` option to make Valkey return only the members in the sorted set without their corresponding scores.
203+
204+
```
205+
127.0.0.1:6379> ZADD myzset 1 a 2 b
206+
(integer) 2
207+
127.0.0.1:6379> ZSCAN myzset 0
208+
1) "0"
209+
2) 1) "a"
210+
2) "1"
211+
3) "b"
212+
4) "2"
213+
127.0.0.1:6379> ZSCAN myzset 0 NOSCORES
214+
1) "0"
215+
2) 1) "a"
216+
2) "b"
217+
```
218+
200219
## Multiple parallel iterations
201220

202221
It is possible for an infinite number of clients to iterate the same collection at the same time, as the full state of the iterator is in the cursor, that is obtained and returned to the client at every call. No server side state is taken at all.

0 commit comments

Comments
 (0)