diff --git a/docs/content/latest/yedis/api/_index.md b/docs/content/latest/yedis/api/_index.md index 3836d8b53662..e8b29febd2a1 100644 --- a/docs/content/latest/yedis/api/_index.md +++ b/docs/content/latest/yedis/api/_index.md @@ -90,6 +90,7 @@ Command | Description | [`ZRANGEBYSCORE`](zrangebyscore/) | Retrieve sorted set entries for a given score range | [`ZREM`](zrem/) | Delete a sorted set entry | [`ZREVRANGE`](zrevrange/) | Retrieve sorted set entries for given index range ordered from highest to lowest score | +[`ZSCORE`](zscore/) | Get the score of member at a sorted set key | General | [`AUTH`](auth/) | Authenticates a client connection to YEDIS API | [`CONFIG`](config/) | Not fully supported. Only used to set the required password(s) for YEDIS API | diff --git a/docs/content/latest/yedis/api/zscore.md b/docs/content/latest/yedis/api/zscore.md new file mode 100644 index 000000000000..21b266aaad74 --- /dev/null +++ b/docs/content/latest/yedis/api/zscore.md @@ -0,0 +1,54 @@ +--- +title: ZSCORE +linkTitle: ZSCORE +description: ZSCORE +menu: + latest: + parent: api-yedis + weight: 2545 +aliases: + - /latest/api/redis/zscore + - /latest/api/yedis/zscore +isTocNested: true +showAsideToc: true +--- + +## Synopsis +`ZSCORE key member`
+Returns the score of the member in the sorted set at key. If member does not exist in the sorted set, +or key does not exist, null is returned. If `key` is associated with non sorted set data, +an error is returned. + +## Return Value + +The score of member (a double precision floating point number), represented as string. + +## Examples + +```sh +$ ZADD z_key 1.0 v1 +``` + +``` +(integer) 1 +``` + +```sh +$ ZSCORE z_key v1 +``` + +``` +"1.0" +``` + +```sh +$ ZSCORE z_key v2 +``` + +``` +(null) +``` + +## See Also + +[`zadd`](../zadd/), [`zcard`](../zcard/), [`zrange`](../zrange/), [`zrangebyscore`](../zrangebyscore/), [`zrem`](../zrem/), [`zrevrange`](../zrevrange)