firebase - Firestore 单字段索引豁免限制

标签 firebase indexing google-cloud-platform google-cloud-firestore

为什么 Firestore 有一个(看似很小的)limit of 200 on single-field index exemptions

如果有的话,允许更多只会帮助降低用户和 Google 的成本,不是吗?

最佳答案

我们需要将该信息保存在可以处理对数据库的写入的每个进程的内存中,并将传入的写入与此豁免列表进行比较。这需要内存管理和延迟影响。

有一些技术可以更轻松地创建最少的豁免(并为您减少配置工作!)。例如,Maps/Objects 可让您轻松创建自己的默认设置。

例如,为参数调用 _auto_off_ 的字段添加一个豁免,并关闭所有索引。将该字段用作 map ,现在该 map 中的每个新字段都不会被索引,而无需对该新字段进行豁免。

如果您决定确实需要查询此 map 中的某个字段,则可以在 map 中明确为该字段创建一个豁免项,例如 _auto_of_.ranking

Screenshot of Single Field Indexing page showing the settings for both the map and the map's sub-field

关于firebase - Firestore 单字段索引豁免限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54613365/

相关文章:

apache-spark - pyspark 错误读取 bigquery : java. lang.ClassNotFoundException : org. apache.spark.internal.Logging$class

java - 使用触发器限制窗口的最大长度

angular - 如何在 AngularFire/TypeScript 中访问 FirebaseError 的 "code"属性?

ios - 发送 HTTP POST 请求时后台模式出现问题

c - C 中数组索引的正确类型是什么?

regex - Perl RegEx 查找@之前的电子邮件地址部分

performance - Postgresql - 使用索引过滤表中超过 1 亿行的行

deployment - Container Registry 中的新 Docker 镜像可以触发 Google Cloud Build 吗?

android - 在Android中使用firebase通过ID查找对象的方法

swift - Firebase 存储上传错误 : FIRStorageErrorDomain Code=-13000