Text search in the database (Firebase)

Asked

Viewed 123 times

-1

Good evening I need to customize a search to recover data from the Restaltime database.

I currently use the following code to query an item in my database:

query = databaseReference.child("itens").orderByChild("nomeItem").startAt(textoDeEntrada).endAt(textoDeEntrada+"\uf8ff");

With this code, if I have an item (nameItem) with the following content "hall football" on my bench and search for "ball" I find the answer, however, if I search for "football" nothing is returned.

What can I use to get the item returned if I search for any of the words contained in the item’s content? That is, whether I type "ball", "football", "from" or "hall" I find the answer.

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.