Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var search = 'something' // the search string toLowerCase();
- db.ref('foo/'+uid)
- .orderByChild('searchIndex')
- .startAt(search)
- .endAt(search + "uf8ff")
- .once('value')
- .then(function(snap){ ... })
- .catch(function(error){ ... });
- "foo": {
- ".read": "auth != null",
- "$uid": {
- ".write": "auth.uid == $uid)",
- ".indexOn": ["searchIndex"]
- }
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement