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.
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...
myhostname.com/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=search_term&searchCriteria[filterGroups][0][filters][0][value]=blueFatal 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