I read here that:
Do not use monotonically increasing document IDs such as:
Customer1, Customer2, Customer3, ...
Product 1, Product 2, Product 3, ...
I plan to use document IDs such:
2023-09-01, 2023-09-02, 2023-09-07, ...
The dates are not always consecutive. It can be or cannot be. Can be these dates be considered monotonically?
>Solution :
Yes. Any time you have a series of sorted values that increment over a small range, that is considered monotonically increasing for the purpose of gauging the write rate limit for indexes in Firestore. This is because they will all cause writes on the same shard of the index that handles that range of values.
Also I would strongly urge you not to use data as document IDs. It’s better to use random IDs, and create an index on the timestamp values instead, if you need to sort and filter on them. This will prevent other future problems with your app when you need to change the schema or the way you organize data.