0

My rules are:

{
  "rules": {
    ".read": true,
    ".write": true,
    "Recent": {
      ".indexOn": ["userID", "chatRoomID"]
    }
  }
}

Still I'm getting:

[FirebaseDatabase] Using an unspecified index. Consider adding ".indexOn": "chatroomID" at /Recent to your security rules for better performance

How do I have to set it properly? I have tried the last 20 minutes, but can't get is right. Help is very appreciated.

1 Answer 1

4

Your rules say ".indexOn": ["userID", "chatRoomID"] but your error says chatroomID.

chatroomID is not the same as chatRoomID.

Sign up to request clarification or add additional context in comments.

4 Comments

will accept in minutes... thank you -.- stupid typo -.-
Happens to the best of us :)
Well spotted Mathew! Given that it's unlikely that a future developer making the same mistake will find this question/answer, I'm going to vote to close it as a typo.
Just trying to help, I have also voted it as a typo as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.