yiisoft / yii2-elasticsearch

Yii 2 Elasticsearch extension
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
429 stars 252 forks source link

Update Command.php #320

Closed inSay closed 2 years ago

inSay commented 2 years ago

The update post url structure is changed in the version 8

| Is bugfix? | ✔️

beowulfenator commented 2 years ago

Thank you very much for the update. Could you please add Elasticsearch 8 to the tests? It's in https://github.com/yiisoft/yii2-elasticsearch/blob/master/.github/workflows/build.yml. Let's see if those tests pass. Thank you!

tehmaestro commented 2 years ago

Hi, I just hit this issue. Isn't this API change also present in 7.x? https://github.com/yiisoft/yii2-elasticsearch/issues/319

beowulfenator commented 2 years ago

I don't know, we're using AWS OpenSearch, whatever version it was forked from, and it seems to work.

beowulfenator commented 2 years ago

Oh, and old code does not cause the tests to fail on ES 7.14.0.

tehmaestro commented 2 years ago

Hi, I can confirm that on 7.x calling /index/_doc/id/_update only triggers a deprecation warning, but it does work. So I would say this pull request seems to do the right thing by checking for dslVersion >= 8. 8.x requires you to do /index/_update/id

beowulfenator commented 2 years ago

I understand, but can somebody please just add a single line to build.yml to add ES 8 to the testing matrix?

beowulfenator commented 2 years ago

This is solved in #323.

lubosdz commented 1 year ago

Pls can be this released? It's been 3 months since the fix. The issue still appears after composer update & users report duplicity.