googleapis / googleapis/google-cloud-node
getPartitions on all queries
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 712
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 99
Description
**Is your feature request related to a problem? Please describe.**
I've seen that the [`getPartitions` API](https://googleapis.dev/nodejs/firestore/latest/CollectionGroup.html#getPartitions) is only available on collection group queries, but not on normal queries. I was wondering why that is. You can always rewrite to use a `collectionGroup`, but it feels weird and unintuitive as a user of the SDK.
**Describe the solution you'd like**
Have partitions on these queries:
```ts
firestore().collection('collectionA/docB/collectionC').getPartitions();
```
**Describe alternatives you've considered**
Alternative, would be to do this:
```ts
firestore().collection('collectionC').getPartitions();
```
And to check for the path ` collectionA/docB/...` on the client.
**Additional context**
This is probably because of the restrictions that [no filters are supported](https://firebase.google.com/docs/firestore/reference/rest/v1beta1/projects.databases.documents/partitionQuery), right?
And to support others there might be the need for creating an additional Firestore index, which is not supported yet.
Contributor guide
Assessment
This issue has not been assessed yet.