Firebase警告:使用未指定的索引 [英] Firebase warning: Using an unspecified index

查看:77
本文介绍了Firebase警告:使用未指定的索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Firebase收到来自JavaScript的查询中使用的每个 orderByChild 的警告消息:

I get this warning message from Firebase for every single orderByChild I used in my queries from JavaScript:


FIREBASE警告:使用未指定的索引。考虑在/ table中添加.indexOn:表示安全规则以获得更好的性能

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

到目前为止,我的查询运行速度非常快我认为没有必要包含 indexOn 。只是想知道有什么负面影响?

So far my queries ran quite fast so I think it is not necessary to include the indexOn. Just wondering what are the negative impacts?

另外,我如何实际禁用警告,因为在我调试时它们非常烦人。

Also, how do I actually disable the warnings as they are quite irritating when I am debugging.

推荐答案

如果您处于开发阶段,您将感受不到与众不同。但随着您的数据增长,索引有助于提高查询速度。

If you are on development phase, you won't feel the difference. But as your data grows indexing helps making your queries much faster.

阅读本文以了解有关索引优势的更多信息。
https://firebase.google.com/docs/database/security / indexing-data

Read this to know more on advantages of indexing. https://firebase.google.com/docs/database/security/indexing-data

据我所知,要禁用警告,您必须编辑firebase源代码。
有什么方法可以禁用所有firebase日志记录控制台?

As far as I know to disable the warnings, you have to edit firebase source code. Is there someway to disable all firebase logging to console?

这篇关于Firebase警告:使用未指定的索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆