Cloud Firestore wildcard for indexing

2020-06-23 01:26发布

What is the syntax for a wildcard level in Cloud Firestore when setting up indexing? I know there is one for security rules.

Thanks.

1条回答
甜甜的少女心
2楼-- · 2020-06-23 02:22

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.

查看更多
登录 后发表回答