I try to solve this issue that I have in Firebase. I want to give user the option to search for friends ok, so he start typing friend name or email, and it should find possible results from firebase database. I have implemented easy with only search for either name or email, but for both, how to solve? Multiple query sound messy to me, is possible somehow?
To search with email in user I do this. Works perfectly but cannot search for name..
Query queryEmail = FirebaseDatabase.getInstance().getReference()
.child(LOCATION_USERS)
.orderByChild(PROPERTY_EMAIL)
.limitToFirst(10)
.startAt(text)
.endAt(text + "~");
Here is what I mean below, is there a way to achieve this?