What is the maximum number of indices allowed in elasticsearch?

I am using MySQL for storing data in my software. We have to generate hundreds of reports using the data and it is taking more time when the size of data in increasing. For some reports it is taking 1 or 2 minutes. So we have decided to use NoSQL database instead of MySQL. We have decided to go with Elasticsearch.

In MySQL, we have different database for each client and inside each database there are more than 50 tables. When coming to Elasticsearch, I am not able to group indices under a database. So I have decided to create separate index with placing client name as prefix. For example in MySQL there are 2 databases named ABC , DEF and a table inside both named ledger . The same thing done in Elasticsearch is by creating an index with name ABC_ledger and DEF_ledger .

In MySQL a single client database has 50 tables so when converting to Elasticsearch it will be 50 index for a single client. So when new clients are added, an additional 50 indices will be created.

My questions are :

  1. Is there any limit in number of indices we can create?
  2. Is there any other way to implement above logic without creating separate indices?

Welcome to our community! :smiley:

There's no hardcoded limit for indices. You will find there's a soft and hard shard limit though.

You need to rethink your data structures. The best option will be to merge all the tables into a single document in Elasticsearch.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.