
1 SorcererXW 2023-06-27 02:45:04 +08:00 - 最好的办法是保证 score 不重复,score 范围这么大,计算 score 的时候多引入一些字段让 score 不冲突即可 - 如果 score 肯定有相同的:每一次查询后,把最后那个 score 的所有项目,生成一个 bloom filter ,存下来或者透传。在查询下一页的时候,把对应的 score 的数据全拉出来,做一层过滤。 |
2 yemoluo 2023-06-27 07:46:17 +08:00 score 是 float64 吧,你把平时的 score + 左边补 0 的 id |
3 guxingke 2023-06-27 10:23:10 +08:00 全查 业务内存排序 sort by score , id |
4 ben548 OP @SorcererXW 好麻烦 |
6 Dlin 2023-06-27 14:07:49 +08:00 我寻思着,也没有啥丢失啊,zrange key minScore maxScore byscore limit offset count |
@Dlin The order of elements is from the lowest to the highest score. Elements with the same score are ordered lexicographically. |
9 Dlin 2023-06-27 14:21:24 +08:00 可是 ZRANGEBYSCORE 也应该不会有什么问题吧? |