Skip to content

Support Delete by query with es parameters. #2875

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

Merged
merged 7 commits into from
Mar 26, 2024

Conversation

youssef3wi
Copy link
Contributor

@youssef3wi youssef3wi commented Mar 15, 2024

  • You have read the Spring Data contribution guidelines.
  • There is a ticket in the bug tracker for the project in our issue tracker. Add the issue number to the Closes #issue-number line below
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

Closes #2865

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 15, 2024
@youssef3wi youssef3wi marked this pull request as ready for review March 16, 2024 11:22
Copy link
Collaborator

@sothawo sothawo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. I see two main issues:

  1. I don't think that DeleteQuery should derive from BaseQuery. This makes it implement the Query interface and so it could be used anywhere where a Query is expected, in searches, highlight etc. We'd need checks at any place where a Query is processed, that it is not a DeleteQueryas this makes no sense. It should contain a Query, that's ok. Like UpdateQuery it should be an independent top level class with it's builder.
  2. import of Elasticsearch classe, i left a note and the point in the DeleteQuery file.

@youssef3wi youssef3wi requested a review from sothawo March 18, 2024 13:17
Copy link
Collaborator

@sothawo sothawo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nullability issue, otherwise some minor comments

youssef3wi and others added 7 commits March 26, 2024 05:03
Signed-off-by: Youssef Aouichaoui <youssef3wi@icloud.com>
Signed-off-by: Youssef Aouichaoui <youssef3wi@icloud.com>
Signed-off-by: Youssef Aouichaoui <youssef3wi@icloud.com>
Signed-off-by: Youssef Aouichaoui <youssef3wi@icloud.com>
Co-authored-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
This commit updates the DeleteQuery to use internal classes instead of Elasticsearch classes.

Signed-off-by: Youssef Aouichaoui <youssef3wi@icloud.com>
Signed-off-by: Youssef Aouichaoui <youssef3wi@icloud.com>
@sothawo sothawo merged commit 496b8d6 into spring-projects:main Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow additional parameters on a delete by query request.
3 participants