0
db.collection("UserInformation").whereEqualTo("userName" , searchEditText.getText().toString())
                                            .get()
                                            .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
                                                @Override
                                                public void onSuccess(final QuerySnapshot documentSnapshots) {

                                                    if (documentSnapshots.isEmpty())
                                                    {

                                                    }else
                                                    {
                                                        List<UserModel> listUsers = documentSnapshots.toObjects(UserModel.class);
                                                        final SearchUserListAdapter adapter = new SearchUserListAdapter(getBaseContext() , listUsers);
                                                        searchLista.setAdapter(adapter);

                                                    }
                                                }
                                            });

i need to ignore case sensitive and find the "nickname" however i typed the nickname with capital or small letters or both i tried to add startAt() or endAt() and i didn't worked for me and the all answers talk about to save the nickname with upper and lower case but it is not good logic to me

Abdelaziz refaat
  • 157
  • 1
  • 12

1 Answers1

2

I think there is no support for lowercase searches in Firebase. An idea to handle this would be to store the lowercase string along side the original string and then query the lowercase string instead.

Bruno
  • 3,872
  • 4
  • 20
  • 37