We have an elasticsearch cluster where we store search data for multiple customers. Right now, we use an index per type of document and filter based on customer ID. This works well for us as all documents are the same.
We now have a requirement that customers should be able to create custom fields on top of the default ones, which are also searchable (customers search their data via a web app so we can control that). The problems around doing what we do now and say prefixing custom fields with the customer ID (way too many fields per index for example) seem like that wouldn't be a good solution.
The only feasible solution I can see is an index per customer with all of the additional overhead that includes (lots of partitions, hot/cold partitions, some large indexes vs some very small).
Are there any other possible ways of doing this that I should investigate?