새소식

Framework/✨ Google Firebase

[Firebase] How to use the firebase .indexOn

728x90

How to use the firebase .indexOn


1. DB Example )


posts >

category > 

"USA" >

LGhGFr86ErZBaEaNtAd >

name : "brown"

point : "100"

...


"LA" >

LGhGFr86ErZBaEaNtAd >

name : "brown"

point : "100"

...


LGhGFr86ErZBaEaNtAd is a Key (some posts)

--> ps. var newPostKey = firebase.database().ref().child('posts').push().key;


2. indexOn Example)


"posts" : {

"category": {

"$location": {

".indexOn": ["point"]

}

}

}


good luck!


#firebase #index #indexon

reference : https://firebase.google.com/docs/database/security/indexing-data?hl=ko

반응형
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.