Create a new index when document has a particular field?

Is it possible to create a new index everytime my document has a particular field updated? say all docs with 'tenant':"100" are part of one index and if a document comes with a field "tenant":101, a new index is created? can this be accomplished with index templates?

You should be able to change the index name based on such a field in the data through an ingest pipeline. Whether that is a good idea or not is a different question though. It probably works for smaller number of tenants, but is unlikely to scale well.

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