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

Fixes #1116 - Add cancel_after_time_interval #1147

Merged
merged 5 commits into from
Aug 21, 2024

Conversation

urinud
Copy link
Contributor

@urinud urinud commented Aug 19, 2024

Description

Describe what this change achieves.
Add cancel_after_time_interval field to SearchRequest and MsearchRequest requests in the Java client.

Issues Resolved

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: uri.nudelman <[email protected]>
@urinud
Copy link
Contributor Author

urinud commented Aug 21, 2024

Hello @dblock what do you think of this PR ?

dblock
dblock previously approved these changes Aug 21, 2024
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Thanks!

  1. @Xtansia is working to generate this code from spec in https://github.com/opensearch-project/opensearch-api-specification, @urinud can you help making sure this field exists and is used in tests in that project?
  2. Looks good!

Leaving this open for @Xtansia to make sure this is in line with what the spec will do.

@urinud
Copy link
Contributor Author

urinud commented Aug 21, 2024

@dblock & @Xtansia , I see the field defined in:
https://github.com/urinud/opensearch-api-specification/blob/7dee041660986c5eb4bc85c2d19af006730746e9/spec/namespaces/_core.yaml#L5376
I also see a test created for this field too. LGTM.

Copy link
Collaborator

@Xtansia Xtansia left a comment

Choose a reason for hiding this comment

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

Changes look good, just one small nit @urinud

* <p>
* API name: {@code cancel_after_time_interval}
*/
public final Builder cancelAfterTimeInterval(@Nullable Time value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should also have the builder Function overload like you've added to SearchRequest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Xtansia , added the function overload method.
I did not added initially becase no other method has function overloads.

@Xtansia Xtansia merged commit c84ad24 into opensearch-project:main Aug 21, 2024
58 checks passed
@Xtansia Xtansia added the backport 2.x Backport to 2.x branch label Aug 21, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 21, 2024
* Fixes #1116

Signed-off-by: uri.nudelman <[email protected]>

* Adds MsearchRequest. Fixes SearchRequest.

Signed-off-by: uri.nudelman <[email protected]>

* Update CHANGELOG.md

Signed-off-by: uri.nudelman <[email protected]>

* spotlessJavaCheck

Signed-off-by: uri.nudelman <[email protected]>

* Adds Builder Function method in MSearch

Signed-off-by: uri.nudelman <[email protected]>

---------

Signed-off-by: uri.nudelman <[email protected]>
Co-authored-by: uri.nudelman <[email protected]>
(cherry picked from commit c84ad24)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Xtansia pushed a commit that referenced this pull request Aug 21, 2024
* Fixes #1116



* Adds MsearchRequest. Fixes SearchRequest.



* Update CHANGELOG.md



* spotlessJavaCheck



* Adds Builder Function method in MSearch



---------



(cherry picked from commit c84ad24)

Signed-off-by: uri.nudelman <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: uri.nudelman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add cancel_after_time_interval to SearchRequest and MsearchRequest
4 participants