【发布时间】:2019-08-04 21:28:12
【问题描述】:
是否有一种理想的方法可以为多个值制作排行榜?例如,Id 希望显示以下架构中总体统计信息最高的用户。使用 Mongodb mongoose discord.js
const statSchema = mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
userName: String,
userId: String,
HLTV: String,
ADR: String,
HS: String,
W: String,
L: String,
T: String,
win_percent: String
【问题讨论】:
-
嗯,这取决于什么算作“整体”,您希望我们计算
L还是userId?请列出您希望如何对它们进行排名但不知道如何。 -
很难想出一个最好的方法来对所有最好的球员进行排名。我认为最好通过胜率、ADR 和 HLTV 来确定总体上最好的玩家
标签: mongodb mongoose discord discord.js