So I have data like so:
pushNotifications {
-K - RwEgd541PIGNOXXUH: {
message: \"Xiaoyu Hugh Hou bid at $900 on your task: New P...\"
no
You need to put the .indexOn
one level higher than what you did:
"pushNotifications": {
".read": "auth != null",
".write": "auth != null",
".indexOn": ["notifyId", "timestamp"]
},
For comparison always look at the Firebase documentation on indexes, which uses this JSON example:
"dinosaurs": {
"lambeosaurus": {
"height" : 2.1,
"length" : 12.5,
"weight": 5000
},
"stegosaurus": {
"height" : 4,
"length" : 9,
"weight" : 2500
}
}
With this indexing rule:
{
"rules": {
"dinosaurs": {
".indexOn": ["height", "length"]
}
}
}