Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. var search = 'something' // the search string toLowerCase();
  2.  
  3. db.ref('foo/'+uid)
  4. .orderByChild('searchIndex')
  5. .startAt(search)
  6. .endAt(search + "uf8ff")
  7. .once('value')
  8. .then(function(snap){ ... })
  9. .catch(function(error){ ... });
  10.  
  11. "foo": {
  12. ".read": "auth != null",
  13. "$uid": {
  14. ".write": "auth.uid == $uid)",
  15. ".indexOn": ["searchIndex"]
  16. }
  17. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement