How to namespace indexes - Automatic not Manual

Mongo has namespacing via different databases on the same db server

RabbitMQ has namespacing via different exhanges

How can I automatically namespace indices with Elastic without manually namespacing keys with prod-x and stage-x etc

Can you provide some context of what you mean with this?

Elasticsearch is a different tool, it does not have the concept of namespace, it has indexes, so it is not clear what you want to achieve.