How many index can i have?

there are a limit of index?
there are downsides about index in faunadb?

There are no restrictions on the number of indexes you have in a given database. While there is some theoretical limit to the number, practically speaking you are likely to run into cost and/or compute-time barriers before you get close to such theoretical limit.

Having more indexes will generate higher costs for your database. Indexes take up Storage space, incur Write Ops when creating new documents that belong in the index, and incur Compute Ops for writing to them as well.

In general, storage is cheap relative to Read/Write/Compute operations, so it is usually cost-effective to optimize your read queries with Indexes. On the other hand, if you have a high mix of write operations on your data, more indexes will make the writes more expensive.

To get an idea of how much a database/application will cost, you really need to run through the pricing calculations against your specific data model. You can check out the docs page for Billing, and there are several topics in the forums that dive into costs for specific kinds of queries, in which Indexes can play a large role.

Another practical limit would likely be the transaction size. All of the work in a transaction is logged and the limit to the size of that log is 16MB.

Consider that if there are many Indexes on a single Collection, then the transaction log will contain everything from all of those indexes – you might quickly hit the transaction size limit. If you have many Collections, and just a few Indexes on each, you are less likely to reach the transaction limit for just writing a Document.

Note that it is possible to hit this limit when creating just one document with a single, very complex Index. See this previous topic: Transaction exceeded limit of 16MB with 56kb file

Here is another discussion about the transaction log size: Transaction exceeded limit: got 24179504, limit 16777216