elastic-search icon indicating copy to clipboard operation
elastic-search copied to clipboard

Do you have plans to support CakePHP 5.1+ and ElasticSearch 8.x?

Open s-nakajima opened this issue 1 year ago • 4 comments

We are using CakePHP 5.1 and ElasticSearch 8.x in our project. Do you have plans to support CakePHP 5.1+ and ElasticSearch 8.x in the future?

s-nakajima avatar Oct 04 '24 05:10 s-nakajima

Do you have plans to support CakePHP 5.1+ and ElasticSearch 8.x in the future?

No immediate plans as that isn't a version combo I'm personally using, but if you're willing to put help out we can get the support added.

markstory avatar Oct 06 '24 16:10 markstory

I spent like 30mins trying to get this to work but I ran into issues connecting the latest elastica version to ElasticSearch 8 due to the fact, that it

  • requires a HTTPS connection (self signed for testing of course)
  • generates a random user/password combo I wasn't able to programmaticaly read out/set

The config which we used till now from the custom Connection object (via DSN parsing) is not compatible with current elastica anymore due to the fact, that keys have changed (like host to hosts which is an array now)

LordSimal avatar Oct 06 '24 16:10 LordSimal

Thanks for the reply. I understand the plan. Once I downgrade my environment to CakePHP 5.0 and ElasticSearch 7, I will proceed.

When I can afford it, I will debug with CakePHP 5.1 and ElasticSearch 8. At that time, I would appreciate your cooperation.

Thanks.

s-nakajima avatar Oct 07 '24 00:10 s-nakajima

Regarding CakePHP 5.1 and ElasticSearch 8.x, I set the following in config/app.php and it worked.

'elastic' => [
    'className' => 'Cake\ElasticSearch\Datasource\Connection',
    'driver' => 'Cake\ElasticSearch\Datasource\Connection',
    'host' => '127.0.0.1',
    'port' => 9200,
    'username' => 'elastic_username',
    'password' => 'hoge',
],

I did not check the operation in detail, but it worked anyway. We report this for your information.

s-nakajima avatar Oct 23 '24 03:10 s-nakajima

Hi there. I got 8.x elastica configured and fix most failed tests here https://github.com/cakephp/elastic-search/compare/4.x...skie:elastic-search:4.x

The last two failed test cases are related to changes in logger functionality and I need help with that.

@LordSimal to make elastic ocnfigured i put next settings in elasticsearch.yml

cluster.routing.allocation.disk.threshold_enabled: false
xpack.security.enabled: false
http.port: 9200

skie avatar Nov 14 '24 05:11 skie

The 5.x branch (WIP) now supports Elastica 9 / Elasticsearch 9

josbeir avatar Oct 15 '25 14:10 josbeir