Skip to content

DeleteByQuery implementation is confusing #2864

Closed as not planned
Closed as not planned
@gh-axel-czarniak

Description

@gh-axel-czarniak

In Elastic REST API the operations _update_by_query and _delete_by_query are very similar:
They both accept a query and they have similar properties.

But in the current implementation of spring, we can't pass parameter to the delete method. The only things we can pass is the query and the index coordinates.

We should be able to pass parameter like Slice, requests_per_second, conflicts, etc like the update query.

My current problem with this is we tried to migrate from the Spring Data ES 4 to Spring Data ES 5 but our current E2E tests failed due to a lot of conflict error with the new delete by query implementation due to a difference in parameter between the 4.X and the 5.X.

In the previous version, the delete by query had slice=1, requests_per_second=-1,wait_for_completion=true and now it's not the case anymore.

Is there any explanation why the delete doesn't allow setting these parameter or allow more custom configuration and possibly introduce a retryOnConflict parameter ?

Maybe it's us who are doing something wrong with our delete but in the current state, we can't migrate due to a high number of conflict.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions