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

Add support for cancel_after_time_interval #273

Closed
sohami opened this issue Jan 7, 2022 · 6 comments · Fixed by #353
Closed

Add support for cancel_after_time_interval #273

sohami opened this issue Jan 7, 2022 · 6 comments · Fixed by #353
Labels
enhancement New feature or request

Comments

@sohami
Copy link

sohami commented Jan 7, 2022

Is your feature request related to a problem?
From OS 1.0 onwards, a new request query parameter cancel_after_time_interval was introduced both for SearchRequest and MSearchRequest to provide cancellation of backend request upon timer expiry. This was done to avoid the wasted resource usage from the requests which client application is not waiting for anymore.

What solution would you like?
The support for this request parameter is already merged in from OS 1.0 however the clients doesn't have support for passing it to the backend. Would be great if this parameter support can be added in all the clients

What alternatives have you considered?
N/A

Do you have any additional context?
Issue: opensearch-project/OpenSearch#817
PR: opensearch-project/OpenSearch@e44e890

@sohami sohami added the enhancement New feature or request label Jan 7, 2022
@epiphone
Copy link

On NodeJS the following workaround might work:

opensearch.search(searchParams, { querystring: { cancel_after_time_interval: '2s' }});

@VachaShah
Copy link
Collaborator

VachaShah commented Nov 2, 2023

@sohami Thank you for raising this issue. Looks like this parameter was not added to [rest-api-spec](https://github.com/opensearch-project/OpenSearch/blob/main/rest-api-spec/src/main/resources/rest-api-spec/api/search.json) in OpenSearch. Creating an issue in opensearch-api-specification #164.

@VachaShah
Copy link
Collaborator

Once the specs in opensearch-api-specification are updated, the clients being generated can be updated. For all other clients, this parameter needs to be added manually.

@dblock
Copy link
Member

dblock commented Apr 26, 2024

Moving this to opensearch-api-specification to check whether this was added to the specs.

@dblock dblock transferred this issue from opensearch-project/opensearch-clients Apr 26, 2024
@dblock dblock removed the untriaged label May 31, 2024
@dblock dblock changed the title Support for new SearchRequest and MultiSearchRequest parameter introduced in OS 1.1 Add support for cancel_after_time_interval Jun 4, 2024
@dblock
Copy link
Member

dblock commented Jun 4, 2024

We have stabilized the OpenAPI spec, if someone wants to take this on, please do! We also support writing tests now :)

@dblock
Copy link
Member

dblock commented Jun 21, 2024

Implemented in #353.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants