관리 메뉴

이사작전.com IT Blog

[Firebase] How to use the firebase .indexOn 본문

Framework/Google Firebase

[Firebase] How to use the firebase .indexOn

말랑고양 플랫폼공작소 2018. 7. 6. 20:04

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

1 Comments
댓글쓰기 폼