I'm trying to make search in my database, by using search bar in Client, and creating an query, that will be in Adapter(FirebaseRecyclerAdapter)
Problem is, that user could search in all parametrs(item or country for example) but i couln't find the solution to find all children
Query. For example user wrote "hat" in search bar, and it'll work if i select "item" in orderByChild, but if he wrote "Germany" it wouldn't work
Query query = reference.orderByChild("item").equalTo("hat");
database
{
"shop": {
"0": {
"item": "hat",
"country": "Germany"
},
"1": {
"item": "hat",
"country": "America"
},
"2": {
"item": "shoes",
"country": "Germany"
}
}
}
So how to make search in All Children? In "item" and in "country" at the same time? Thanks in advance.