Skip to content

Elasticsearch7 returns string but not array for the category page

When I tried to load my category page, the following error showing…
TypeError: Return value of MagentoElasticsearch7ModelClientElasticsearch::query() must be of the type array, string returned in /home/758955.cloudwaysapps.com/svjdbvkfqv/public_html/vendor/magento/module-elasticsearch-7/Model/Client/Elasticsearch.php:367>

Versions details

  1. Windows 10

  2. Magento 2.4.2

  3. Elasticsearch 7.6 installed in cloudways

I updated the Store->Configuration -> Catalog -> Catalog -> catalogSearch area in admin and the Test button returns Successfull.

Any kind of help will be appreciated…