Is this a bug? (users ranking and reputation )
-
When I order users according to their reputations, last page gives me -4
However, we have a person with -60 reputation (he is great at annoying people, so he deserves it )...
Is this a bug? or there is a threshold for the order?
-
Seems like a bug, all users should be visible on the reputation page.
Can you check if the
uid
of that user is in theusers:reputation
sorted set. Run the below mongodb query.db.objects.find({_key: "users:reputation", value: "<uid_of_user>"});
If it's not finding any documents, then you will have to add that uid manually will the below query.
db.objects.insert({_key: "users:reputation", value: "<uid_of_user>", score: -60 });
-
@baris said in Is this a bug? (users ranking and reputation ):
db.objects.find({_key: "users:reputation", value: "<uid_of_user>"});
Hi Baris,
Thank you for your support. Here's the output;
> db.objects.find({_key: "users:reputation", value: "967"}); { "_id" : ObjectId("5afaf7cb955f6475f7b7119f"), "_key" : "users:reputation", "value" : "967", "score" : -60 }
-
@baris also, user numbers are not consistent under different options...
Can you please check this, and then "user" tab...
https://yesilkartforum.com/forum/users?section=sort-reputation&page=331
number of users are different...
The same is true for this nodebb forum, can you check number of users and then the ones under "most reputation" tab?
Somehow, there is more users under "most reputation"... are purged/deleted users causing the confusion?
should I carry this to github?
-
Yes, seems like the issue is caused by the user count mismatch.
Can you run these queries to see the different values stored.
db.objects.findOne({_key: "global"}).userCount; db.objects.count({_key: "users:joindate"); db.objects.count({_key: "users:postcount"); db.objects.count({_key: "users:reputation");
-
@baris said in Is this a bug? (users ranking and reputation ):
db.objects.findOne({_key: "global"}).userCount;
> db.objects.findOne({_key: "global"}).userCount; 7935 > db.objects.count({_key: "users:joindate"}); 7935 > db.objects.count({_key: "users:postcount"}); 7959 > db.objects.count({_key: "users:reputation"}); 7969
-
Hi Baris,
We have upgraded to 1.13.3, but I think this problem is not gone completely...
In "most flags" user, number of users in each page is now 24... so, that is fixed...
But "most reputation" page, at the last page I still cannot see least reputed users... So, still not all users are on the list, FYI...
-
You might have to run this query to fix some invalid values in the user lists.
db.objects.updateMany({_key: "users:reputation", score: NaN}, {$set: {score: 0}});
I ran that to fix the issue on our forum and I can see negative users now. https://community.nodebb.org/users?section=sort-reputation&page=376