144
rated 0 times
[
151]
[
7]
/ answers: 1 / hits: 19004
/ 9 Years ago, mon, october 19, 2015, 12:00:00
I have data set up like this:
Tasks:{
Group 1:{
pushid1:{
date: 18921949021,
title: Do something
},
pushid2:{
date: 18921949021,
title: Do something else
}
},
Group 2:{
pushid3:{
date: 18921949021,
title: Do another thing
}
}
}
I reference it by date so I only get the tasks made after a certain time.
var now = Date.now();
var taskRef = new Firebase(FB + /tasks/ + thisGroup);
taskRef.orderByChild('date').startAt(now).on(child_added, function(snap){
console.log(snap.val());
});
This all works fine, for each group I get a warning message saying something like this:
FIREBASE WARNING: Using an unspecified index. Consider adding .indexOn: date at tasks/Group 1 to your security rules for better performance
How do I add that to my security rules? I can't add one for each group a user makes, is there a wild card entry of some type?
More From » firebase