0
votes

I'm trying to verify data if it's "Yes".So if this user "Minivip=Yes" turn something.But i can't get data from firebase.I get this error and i changed my database rule like this.

   {
      "rules": {
        "Kullanıcılar": {
          ".indexOn": ["Minivip", "Kredi"]
        },
          ".read": true,
    ".write": true
      }
    }

My database looks like

|Kullanicilar
    -|userid
       --Minivip: "Yes";
    -|userid
       --|Minivip: "Yes";
    -userid
       --|Minivip: "No";

I use this code for receive data from database.

var viplerigetir = firebase.database().ref();
viplerigetir.child('Kullanıcılar').orderByChild('Minivip').equalTo('Evet').on("value", function(snapshot) {
    //console.log(snapshot.val());
    snapshot.forEach(function(data) {
        console.log(data.key);
    });
});

But i keep get this error on console.What's wrong ?

Error message

FIREBASE WARNING: Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ".indexOn": "Minivip" at /Kullanıcılar to your security rules for better performance.

1
What is the exact, complete error message you get? It will typically tell precisely what index it is trying to use. - Frank van Puffelen
FIREBASE WARNING: Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ".indexOn": "Minivip" at /Kullanıcılar to your security rules for better performance. - Dorbagna
I think ı found the issue.It say /Kullanıcılar But my child is Kullanıcılar.So i use invalid character but i use like this.Because nobody can use the app if i change.I have get 1000 download already. - Dorbagna

1 Answers

1
votes

I'm using invalid character that's way ı get this error.I add my html in head code.

    <head>
    <title></title>
    <meta charset="utf-8">
</head>