Skip to content
Advertisement

Firebase database – filtering and ordering query

I’m working on a React Native app, and trying to set up a user research in the database, based on a given text.

Here is my request code :

JavaScript

Database looks like :

JavaScript

The query returns what I want, but I have an error on each query only saying “@firebase/database:”. And nothing else…

How can I fix it?

Advertisement

Answer

Most likely it is a warning about no index. Try adding an index to your data. You can do that by adding the following to the database.rules.json file:

JavaScript

And deploying.

Or by editing the rules in the Firebase Console.

As described in the indexing data documentation page

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement