I need to filter the data in client side from FirebaseRecyclerAdapter. Is there any way to do it without removing the data in firebase database?
At the moment, server-side filtering is your best option. We're considering adding client-side filtering (#15), but it's not a very natural fit with the realtime nature of the Firebase Database.
Then is there any options to filter not equal to any specific value in query.?
The query model of the Firebase Database does not support a "not equal"
filter.
But performing such a filter client-side would in that case also not be a
good solution, since you'd be pulling down more data than needed.
A better option would be to model your data in a way that allows this query
For example if you put all the items that have the "not equal" condition
under a common node, you won't need a query at all. This sort of custom
indexing is quite common with Firebase and NoSQL databases in general.
On Mon, May 23, 2016 at 6:28 AM sivai2i [email protected] wrote:
Then is there any options to filter not equal to any specific value in
query.?—
You are receiving this because you modified the open/close state.Reply to this email directly or view it on GitHub
https://github.com/firebase/FirebaseUI-Android/issues/135#issuecomment-220979930
But I couldn't have a model like that. Let me tell the scenario which i am facing now. I am developing a chat application where i need to show the list of registered users. All users are under the same node "user". I am fetching all the users from this node so, I need to filter current user from the list of users.
Exact same issue that I'm facing. Can anyone help us on this one?
@sivai2i , A temporary solution for this would be to let the FirebaseRecyclerViewAdapter work the way it works, but in your ViewHolder, you just show the current user as the current user("You") and disable the click event or any other action in general to the RecyclerView, for that item.
same problem here
I have same problem too. I want to show a list of users except the current user
In your populateViewHolder() call do something like:
if (user.id.equalsIgnoreCase(application.getUser().id))
return;
userViewHolder.bind() // etc
and override getItemCount() to return count - 1 (you want to handle instances where count will be 0, etc).

@sivai2i are you maybe using INVISIBLE when you should be using GONE to hide views?
I have created custom FirebaseRecyclerAdapter that support the Filterable feature.
Custom Filterable FirebaseRecyclerAdapter
Is there any way to stop accessing a particular child from a node using firebase rules? So this problem can be solved easily?
Most helpful comment
But I couldn't have a model like that. Let me tell the scenario which i am facing now. I am developing a chat application where i need to show the list of registered users. All users are under the same node "user". I am fetching all the users from this node so, I need to filter current user from the list of users.