Web Analytics

Fill the form & Get Installation Support

    How to check programmatically elasticsearch is enabled or not in Magento2?

    If your site has installed a third-party search engine and you want to know the elastic search is enabled or not, you can identify it.

    First, you need to instantiate the Magento\Elasticsearch\Model\Config class to your __construct() method.

    And then you can use the below code.

    Now, you need to call below command.

    The result will be true if your site has enabled elastic search.

    Fill the below form if you have any Magento programming need.

      Recent Articles

      Author Info

      Author Image

      Magento Certified Developer

      Hire J. Lakum

      Get a Free Quote

        Connect With Us