Elasticquent
Elasticquent copied to clipboard
No handler found for uri and method [POST] using mappingProperties (with temp fix)
When adding a mappingProperties property to a modal, creating an index would fail with...
No handler found for uri [/items] and method [POST]
Not sure if this is an 5.0 thing but looking at the docs a PUT method is required to build an index.
I have temporarily fixed this by modifying the getMethod method in the Endpoints/Indices/create class to always return PUT. Now able to create an index with custom mapping.
Would be good to get some feedback on what the problem is and if the fix mentioned above is acceptable.
Thanks.
I just noticed in the elastic/elasticsearch-php repo they have made the same change in this commit - https://github.com/elastic/elasticsearch-php/commit/9c620c20ec4a473926a858b7aa1c22b126b166f7
I can see in composer.json you are requiring <2.2 version of this pacakge. Has anyone tested any later releases of this package with elasticquent? There appears to be quite a number of changes since 2.2 and it would be good to pull the latest version?
Thanks,
A newer version of elastic/elasticsearch-php has not yet been tested. It is on my 'TODO' list, but I simply have not yet had too much time to dedicate to it.
Feel free to test and make a PR 👍
Any news about that issue ?
Facing issue with createIndex:: no No handler found for uri [/my_custom_index_name] and method [POST]' elasticsearch version 2.1.5 i believe its because of Elasticquent not compatible with newer version of elasticseach. please update.
This issue come from the ElasticSearch PHP client. In the ElasticSearch 5.0+, they do not allow create index with POST method. So, their ElasticSearch PHP client reflects to that. Check the code at the tag: https://github.com/elastic/elasticsearch-php/blob/v5.1.3/src/Elasticsearch/Endpoints/Create.php (line 92)
So, the proper way to fix this issue in Elasticquent is just simply change the dependency version of ElasticSearch PHP client to point to the v5.1.3. Yah, but you need to test to ensure Elasticquent run properly with this version. I am going to run a test myself and will let you know
I'm having the same issue where mappingProperties would cause a no handler error
Came across same issue while creating the initial index. Dont use POST to create an index rather use PUT.
Can you please fix this issue @timgws it's been 6 months waiting for an official fix.