Changing the Elasticsearch or OpenSearch port via CLI (Magento 2)

To configure the Elasticsearch port from the Magento 2 command line (CLI), use:

If you use OpenSearch, run this command instead:

This way, you do not need to sign in to Magento 2 admin to change the port.…

Fixing Call to undefined method Interceptor::getCollectionClone() (Magento 2)

If you receive the error Error: Call to undefined method Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor::getCollectionClone() in /vendor/mageplaza/layered-navigation-m2/Model/Layer/Filter/Price.php:179 , the wrong search engine may be configured. For example, Elasticsearch may be running on the server while Magento is configured to use OpenSearch. Check the Magento…