用于索引的Cloud Firestore通配符 [英] Cloud Firestore wildcard for indexing
本文介绍了用于索引的Cloud Firestore通配符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
设置索引时,Cloud Firestore中通配符级别的语法是什么?我知道有一个安全规则.
What is the syntax for a wildcard level in Cloud Firestore when setting up indexing? I know there is one for security rules.
谢谢.
推荐答案
Cloud Firestore索引基于集合名称,而不是完整的集合路径.因此,如果要在users/{id}/messages
上创建索引,正确的方法是在messages
上创建索引.
Cloud Firestore indexes are based on collection names, not full collection paths. So if you want to create indexes on users/{id}/messages
, the correct way to do this is to create an index on messages
.
所有同名的集合,即使嵌套在文档下,也共享相同的索引.
All same-named collections, even if nested under documents, share the same indexes.
这篇关于用于索引的Cloud Firestore通配符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文