DMKEBUSINESSGMBH/typo3-mksearch

Elastica Library updation

Closed this issue · 10 comments

Hi,
If there is someone working to update Elastica Library?

No, I think there is nobody.

i have made some minor changes in Status.php of Elastica Library to make it work with the latest Elastic Search. if i give you Pull Request of that. would you accept that?

Please don't change the currently included Elastica library. This way we won't be update-safe. Instead try to include the current Elastica library to make it work.

ok i need bit of your help. new Elastica library needs Psr\Log and Elasticsearch Libraries. i updated Elastica in lib folder and then placed 2 libraries in the same folder lib. and path is also fine with namespace like in lib folder there is Psr\Log\NullLogger class but it still gives me error Class 'Psr\Log\NullLogger' not found in mksearch/lib/Elastica/Client.php

Take a look here. The autoloading is only implemented for classes with "Elastica" in it. I think that's why it won't work.

The autoloading of Elastica needs to be implemented differently I think. The best would be to use composer autoloading but this will only work since TYPO3 7.6. Another downside is that you would need to add Elastica as dependency for mksearch. This way you could only use ElasticSearch with mksearch if the project is built through composer. Nevertheless you should give it a try (you need to take care that Elastica is installed into the correct path -> /lib).

yes i edited that code and now it loads properly Psr and Elasticsearch, now checking alternatives of deprecated functions

pull request sent.

Is this version of Elastica backwards compatible to older ElasticSearch versions?

this is not tested. but i dont have older ver of elastic search installed on my VM. can you do that if you have older ver of elastic search?

Seems like the newest version only supports ElasticSearch 5.x. The initial development was done with ElasticSearch 1.4.0. It would be great to have the possiblity to use different versions of ElasticSearch/Elastica.
But I guess this would mean some more changes to the code.