Setting the OpenSearch host and port via CLI (Magento 2)

To configure OpenSearch as your Magento 2 search engine from the command line (CLI), run these three commands:

The final command is optional and only necessary if OpenSearch was not already configured as the search engine.