I want to make a query on my firebase database. I want all my "sheets" ordered on starsCount
value for making a ranking. But i also want just the sheets
of a specified category ( Where classe child value equals 01UXe0rm78CrLiynLUQw for exemple )
My datas :
This is my code :
let ref = Database.database().reference().child("sheets").queryOrdered(byChild: "starsCount").queryEqual(toValue: 01UXe0rm78CrLiynLUQw, childKey: "classe").queryLimited(toLast: 15)
ref.observeSingleEvent(of: .value) { (snapshot) in
guard let values = snapshot.value as? NSDictionary else {
return
}
...
And i have a console message :
2017-12-13 20:35:43.219165+0100 Notee[500:118222] [Firebase/Database][I-RDB034028] Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ".indexOn": "starsCount" at /sheets to your security rules for better performance