Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No getType on RequestInterface #13

Closed
ddattee opened this issue Apr 18, 2016 · 8 comments
Closed

No getType on RequestInterface #13

ddattee opened this issue Apr 18, 2016 · 8 comments
Assignees
Milestone

Comments

@ddattee
Copy link

ddattee commented Apr 18, 2016

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.

@ddattee ddattee changed the title Wrong declaration for RequestInterface in Search Adapter No getType on RequestInterface Apr 18, 2016
@ddattee
Copy link
Author

ddattee commented Apr 18, 2016

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

@danslo
Copy link

danslo commented Oct 21, 2016

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

@damienwebdev
Copy link

damienwebdev commented Dec 31, 2016

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.

@damienwebdev
Copy link

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

@DependencyHell
Copy link

DependencyHell commented Feb 20, 2017

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

@romainruaud
Copy link
Collaborator

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

@ddattee
Copy link
Author

ddattee commented Nov 7, 2017

Linked to #217

@afoucret
Copy link
Contributor

afoucret commented Nov 8, 2017

Closed for being a duplicate of #217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants