Skip to content

Type in delete by query command #326

Open
@Camper12345

Description

@Camper12345

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.

Activity

B0rner

B0rner commented on Mar 6, 2023

@B0rner

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.

lubosdz

lubosdz commented on Mar 17, 2023

@lubosdz
Contributor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Type in delete by query command · Issue #326 · yiisoft/yii2-elasticsearch