From c29a8c61c447b1115aa58c62e62d55ffebdcefac Mon Sep 17 00:00:00 2001 From: "chenyangyang.cy" Date: Wed, 27 Oct 2021 10:17:38 +0800 Subject: [PATCH] Update README --- README-CN.md | 5 ++++- README.md | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README-CN.md b/README-CN.md index 9dd5cca..02b773f 100644 --- a/README-CN.md +++ b/README-CN.md @@ -4,10 +4,13 @@ ### 主要的特性如下: -- 支持(任意)多维score排序,且任意维度精度不丢失 +- 支持多维(最大255)score排序,且任意维度精度不丢失 - 在多维score下仍然支持incrby语义 - 语法和原生zset类似 +### 排序规则: +对于多维score而言,左边的score优先级大于右边的score,以一个三维score为例:score1#score2#score3,tairzset在比较时,会先比较score1,只有score1相等时才会比较score2,否则就以score1的比较结果作为整个score的比较结果。同理,只有当score2相等时才会比较score3。 + ### 应用场景: - 游戏玩家之间排序 - 直播间主播热度排序 diff --git a/README.md b/README.md index 1b71edf..b257bb0 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,12 @@ ### Features: -- Support (arbitrary) multi-score sorting, and the accuracy of any dimension is not lost +- Support multi-score(Limited to 255)sorting, and the accuracy of any dimension is not lost - Incrby semantics is still supported under multi-score sorting -- The syntax is similar to redis zset +- The syntax is similar to redis zset +### Sorting rules: +For multi-dimensional scores, the priority of the score on the left is greater than the score on the right. Take a three-dimensional score as an example: score1#score2#score3. When comparing, tairzset will compare score1 first, and only compare score2 when score1 is equal, otherwise it will Take the comparison result of score1 as the comparison result of the entire score. In the same way, score3 will be compared only when score2 is equal. ### Application scenario: - Sorting among gamers - Anchor popularity ranking in live room