Skip to content

RequestFactory#updateByQueryRequest creates request with only the first index from IndexCoordinates #2191

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

Closed
idemidenko opened this issue Jun 24, 2022 · 1 comment · Fixed by #2197
Assignees
Labels
type: bug A general bug

Comments

@idemidenko
Copy link

idemidenko commented Jun 24, 2022

Version

spring-data-elasticsearch:4.2.3

Description

updateByQueryRequest takes only the fist index from IndexCoordinates and therefore creates an update request with the single index, instead of that the request should contain all indices passed in IndexCoordinates

public UpdateByQueryRequest updateByQueryRequest(UpdateQuery query, IndexCoordinates index) {

    String indexName = index.getIndexName(); // takes only the fist index from IndexCoordinates
    // String[] indexName = index.getIndexNames(); - should take all index names instead
    final UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(indexName);
    // ...
}
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 24, 2022
@sothawo sothawo added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 25, 2022
@sothawo
Copy link
Collaborator

sothawo commented Jun 25, 2022

Note: The code in main using the new Elasticsearch client handles this correctly, must be fixed in the deprecated code for the old client there and backported to 4.4 and 4.3 (4.2 is out of maintenance)

@sothawo sothawo self-assigned this Jun 25, 2022
sothawo added a commit to sothawo/spring-data-elasticsearch that referenced this issue Jun 25, 2022
sothawo added a commit that referenced this issue Jun 25, 2022
Original Pull Request #2197
Closes #2191
sothawo added a commit that referenced this issue Jun 25, 2022
Original Pull Request #2197
Closes #2191

(cherry picked from commit f901380)
sothawo added a commit that referenced this issue Jun 25, 2022
Original Pull Request #2197
Closes #2191

(cherry picked from commit f901380)
(cherry picked from commit ae66cbd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants