Firebase Warning: Using an Undefined Index

I get this warning from Firebase for every one orderByChildI used in my requests from JavaScript:

FIREBASE WARNING: Using an unspecified index. Consider adding ".indexOn": "" at / tables to your security rules for better performance.

So far, my queries have been fairly fast, so I believe there is no need to include indexOn. Just wondering what are the negative consequences?

Also, how can I actually turn off warnings, as they are pretty annoying when I debug.

+6
source share
2 answers

If you are at the development stage, you will not feel the difference. But as your indexing data grows, your queries are much faster.

Read this to learn more about the benefits of indexing. https://firebase.google.com/docs/database/security/indexing-data

As far as I know, in order to disable warnings, you have to edit the firebase source code. Is there a way to disable firebase logging on the console?

+6
source

As others said: if you do not define an index, all filtering occurs on the client side. This is probably good during initial development, but as additional data is added it becomes more wasteful.

, Firebase. Firebase . . Firebase.

, ?

  • , , JavaScript.
  • , Firebase "" . , , Firebase ( ). , Firebase , .
+3

All Articles