79793345

Date: 2025-10-17 18:30:41
Score: 3
Natty:
Report link

Follow-up on Firebase Realtime Database Leaderboard Solution :

Hi @Frank, thanks for the answer! 🙏

I was able to solve it by updating the query:


var task = reference.Child("users")  
    .OrderByChild("levelContainer/highestScore")  
    .StartAt(currentUserScore, userId)  
    .GetValueAsync();

What I have achieved :

Follow-up Questions :

  1. Would Firestore be a better choice for this type of use case where I need to query/search over a large list of users?
  2. I’ve set the rule as you mentioned — but does setting .indexOn also sort the data in the Firebase console UI? (Because it didn’t appear sorted there.)
Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (0.5): 🙏
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Frank
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Oozeer