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

Type in delete by query command #326

Open
Camper12345 opened this issue Aug 11, 2022 · 2 comments
Open

Type in delete by query command #326

Camper12345 opened this issue Aug 11, 2022 · 2 comments
Labels

Comments

@Camper12345
Copy link

Camper12345 commented Aug 11, 2022

if ($this->type !== null) {

It seems like there is a bug that causes model type to be added to _delete_by_query request url even if dsl version is greater than 7.
In most other functions in this file there is a check for that, but not in deleteByQuery.

@B0rner
Copy link

B0rner commented Mar 6, 2023

I can confirm this bug.
I have the same problem.
The problem: due to this bug, the functional tests in yii no longer work.
When using test fixtures and elastic search, yii seems to clean up the test data for each test. The yii framework uses exactly this function and runs into an error.
As a result, Elastic Search 8 does not work in codeception test at yii.

@samdark samdark added the type:bug Bug label Mar 7, 2023
@lubosdz
Copy link
Contributor

lubosdz commented Mar 17, 2023

So it should be:

if ($this->db->dslVersion < 7 && $this->type !== null) {
    $url[] = $this->type;
}

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

No branches or pull requests

4 participants