Firestore 集合的最大深度是多少?

What is maximum depth of Firestore collection?

我在 Firebase Firestore documentation 上看到 "Maximum depth of subcollections" 的限制是 100。

这是指一个合集总共可以有多少个子合集?喜欢 /collection/document/sub1/document/collection/document/sub2/document 一直到 /collection/document/sub100/document?

或者这是否以会使文件路径变长的方式引用它?例如:/collection/document/sub1/document/sub2/document/.../sub100/document?

Does this refer to the number of sub-collections that one collection can have in total?

不是,是不是是指一个集合总共可以有多少个子集合,是指你可以加深的子集合个数, 最多为 100.

Or does this refer to it in the way that would make the file path longer? For instance: /collection/document/sub1/document/sub2/document/.../sub100/document?

是的,这是正确的方法。

另请注意,Firestore 在级别 1 和级别 100 时一样快。