user10217397
user10217397

Reputation:

Index not defined in firebase

This is the error I receive:

 "error" : "Index not defined, add \".indexOn\": \"release/date\", for path \"/north_america\", to the rules"

And this is the structure of my firebase data:

enter image description here

And my added rules don't seem to work, any help?

enter image description here

Upvotes: 1

Views: 2311

Answers (1)

sketchthat
sketchthat

Reputation: 2688

Try updating your database rules again with the index another level down.

"likes": {
  "north_america": {
    "$someid": {
      "release": {
        ".indexOn": ["date"]
      }
    }
 }

Also you should be able to wildcard out north_america so it works globally.

Upvotes: 3

Related Questions