-
Notifications
You must be signed in to change notification settings - Fork 113
Add docs for async stop command #2181
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -299,6 +299,24 @@ If the response’s `is_running` value is `false`, the query has finished and th | |||||
} | ||||||
``` | ||||||
|
||||||
You can interrupt a running async query and collect the results that have been computed so far by using the [async stop API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop) with the query ID. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. interrupt implies it can be resumed? |
||||||
|
||||||
```console | ||||||
POST /_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=/stop | ||||||
``` | ||||||
The query will be stopped and the response will contain the results computed so far, in the same format as the `get` API. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sentence is a bit long |
||||||
|
||||||
```console-result | ||||||
{ | ||||||
"is_running": false, | ||||||
"took": 48, | ||||||
"is_partial": true, | ||||||
"columns": ... | ||||||
} | ||||||
``` | ||||||
This API will also return the result of the query if it has finished before the stop request was made, within the `keep_alive` period. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit about the phrasing, I suggest "This API can be used to retrieve results even if the query has already completed, as long as it's within the |
||||||
You can use the `is_partial` field to determine if the results are complete or not. If `is_partial` is `true`, the results may be incomplete. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Again just cutting sentence length. I'd also like to be more precise here if possible, like what's the difference between partial and incomplete? The more explicit the better where possible. |
||||||
|
||||||
Use the [{{esql}} async query delete API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-delete) to delete an async query before the `keep_alive` period ends. If the query is still running, {{es}} cancels it. | ||||||
|
||||||
```console | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is GA in 9.0 right, so we don't need additional applies_to tags?