Hi,
@firebase/database: FIREBASE WARNING: Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ".indexOn": "status" at /groups/test/leadPropertyInformations to your security rules for better performance.
I have tried this:
{
"rules": {
".read": "auth != null",
".write": "auth != null",
"groups": {
".indexOn": ["leadPropertyInformations/status"]
}
}
}
And this too:
{
"rules": {
".read": "auth != null",
".write": "auth != null",
"groups": {
"$groupID": {
"leadPropertyInformations":{
"$id" : {
".indexOn": ["status"]
}
}
}
}
}
}
But still the same error as above. Any help here. Thanks!
Note: You cannot see status property. But it is there on the 3rd arrow path and the same level.
Query using AngularFire
getActiveLeadPropertyInformations(): Observable<LeadPropertyInformationModel[]> {
return this.angularFireDatabase
.list<LeadPropertyInformationModel>(
`groups/${this.groupId}/leadPropertyInformations`,
(ref) => ref.orderByChild('status').equalTo('active')
)
.valueChanges()
.pipe(first());
}