Elasticsuite: No getType on RequestInterface

Created on 18 Apr 2016  路  8Comments  路  Source: Smile-SA/elasticsuite

While doing a search throught the nativ REST API
I stumble upon this error :

Fatal error: Call to undefined method Magento\Framework\Search\Request::getType()

Which come from the fact that in Search/Adapter/ElasticSuite/Adapter.php on l.75 and l.94 the function await a Magento\Framework\Search\RequestInterface which has no getType method.

bug enhancement

All 8 comments

What is actually awaited seem to be a Smile\ElasticSuiteCore\Search\RequestInterface wich is not compatible with the Magento\Framework\Search\AdapterInterface the Adapter class implement.

A solution would be to write a compatible Search class to replace Magento\Framework\Search\Search so that the RequestBuilder process return an ES search request.

I've tried to resolve this issue with the PR #15

Just got bitten by this as well. Thanks for the PR @ddattee - can one of the maintainers have a look? @romainruaud @afoucret

Seeing this as well with 2.2.5 I followed the documented steps and get...

Steps to reproduce

  1. Install Magento 2.1.3 .
  2. Install Smile_ElasticSuite extension successfully as per documentation with default configurations
  3. Attempt to reach url: myhostname.com/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=search_term&searchCriteria[filterGroups][0][filters][0][value]=blue

Expected result

  1. I would see some sort of API response including the information that matched the searchterm.

Actual result

Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Search\Request::getType() in /code/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Adapter.php:98 Stack trace: 
#0 /code/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Adapter.php(78): Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Adapter->doSearch(Object(Magento\Framework\Search\Request)) 
#1 /code/vendor/magento/module-search/Model/SearchEngine.php(42): Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Adapter->query(Object(Magento\Framework\Search\Request)) 
#2 /code/vendor/magento/framework/Search/Search.php(72): Magento\Search\Model\SearchEngine->search(Object(Magento\Framework\Search\Request)) 
#3 [internal function]: Magento\Framework\Search\Search->search(Object(Magento\Framework\Api\Search\SearchCriteria)) 
#4 /code/vendor/magento/module-webapi/Controller/Rest.php(307): call_user_func_array(Array, Array) #5 /code/vendor/magento/module-webapi/Controller/Rest.php(216): Mage in /code/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Adapter.php on line 98
500

@afoucret & @romainruaud Seems like an issue implementing an interface as @ddattee mentioned.

Still seeing this on 2.3.0. @afoucret & @romainruaud is there any discussion on this issue at all?

Up, using Magento as a back-end solution, the search through API is unusable with ElasticSuite...

Hello,

this is a known issue, and this is being developped internally, but under prioritized for now.

We'll give an update on the subject with @afoucret soon.

regards

Closed for being a duplicate of #217

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  4Comments

lingwooc picture lingwooc  路  5Comments

tschirmer picture tschirmer  路  4Comments

DanieliMi picture DanieliMi  路  5Comments

susonwaiba picture susonwaiba  路  3Comments