0
I need to search my database, which "FLOOR KEY" is "main".
The data I have is as follows::
this. _userid = ALLIANCE
this. _mapID = MAP NAME THAT WAS CLICKED ON MARKER OF GOOGLE MAPS
What I don’t have is the name of the "FLOOR" that I need to find agreement with what I said above.
I get the following notification on the console:
util.js:189 FIREBASE WARNING: Using an unspecified index. Your data will be downloaded and Filtered on the client. Consider Adding ". indexOn": "floorType" at /users/Aliansce/MAPS/Viaparqueshopping/FLOORS/B30 to your security Rules for Better performance.
My code is this::
static AsyncQueryMainFloorMap(mapID){
const GOOGLE_MAPS_STATIC_CLASS = GoogleMaps;
this._userID = "Aliansce";
this._mapID = mapID;
this._mapFloorROOT = this.FirebaseInstance.ref('users/' + this._userID + '/MAPS/' + this._mapID).child('FLOORS');
this._mapFloorROOT.once('child_added').then((mapFloorSnapshot) => {
this._floorROOT = this.FirebaseInstance.ref('users/' + this._userID + '/MAPS/' + this._mapID + '/FLOORS/').child('' + mapFloorSnapshot.key + '/');
this._floorROOT.orderByChild('floorType').equalTo('main').once('child_added').then((e) => {
console.log(e.key)
});
}) .catch((error) => {
console.warn("error: " + error);
// TODO
});
};