«Class "Elasticsearch\ClientBuilder" not found» in Magento 2.4.6 and 2.4.7-beta1

2023-07-16--15-55-46

1. The class Elasticsearch\ClientBuilder exists in elasticsearch/elasticsearch < 8

2. The class Elasticsearch\ClientBuilder does not exist in elasticsearch/elasticsearch ≥ 8

3. Magento 2.4.6 and 2.4.7-beta1 require elasticsearch/elasticsearch 7.17 or 8.5:

4. Magento 2.4.6 and 2.4.7-beta1 include the Magento_Elasticsearch7 module:

5. The Magento_Elasticsearch7 module in Magento 2.4.6 and 2.4.7-beta1 references the Elasticsearch\ClientBuilder class:

How do I adjust Magento ≥ 2.4.6 to Elasticsearch 8?

How did I fix «magento/module-elasticsearch-8[100.4.0, 100.4.1] cannot be installed as that would require removing magento/magento2ce[dev-2.4-develop]. They all replace magento/module-elasticsearch-7 and thus cannot coexist»?