-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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 completion_time time field to async_search get and status response #97700
Conversation
Pinging @elastic/es-search (Team:Search) |
Hi @quux00, I've created a changelog YAML for you. |
695b8a2
to
2720025
Compare
Hi @quux00, I've created a changelog YAML for you. |
The completion_time is set as the start_time (already present) plus the 'took' time that is set in the SearchResponse object and only if the isRunning status == false since took is set even for in-progress searches. We use the 'took' field because it is based on relative time, not absolute wall clock time which can go backwards due to NPT issues. See the comments in TransportSearchAction about the SearchTimeProvider for details. Closes elastic#88640
…ion_time_in_millis entry. Fixed docs tests to handle the new completion_time_in_millis in the response.
This required incrementing the TransportVersion as unlike the AsyncResponse, the status response does not have access to the searchResponse, which has the took value that is used to compute the completion time in the AsyncResponse.
be81322
to
1cbade0
Compare
Hi @quux00, I've created a changelog YAML for you. |
Hi @quux00, I've updated the changelog YAML for you. |
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.
LGTM please sync up with Kibana to make sure they are notified that this is being implemented, and let them verify as well as migrate their code to use this new field.
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.
Thanks @quux00, this also LGTM
Updates the spec for the response objects for `POST _async_search`, `GET _async_search/:id`, `GET _async_search/status/:id` and `GET _search` Two high level changes have happened in 8.10: 1) `completion_time` and `completion_time_in_millis` (async_search only) elastic/elasticsearch#97700 2) Adding `details` metadata to the `_clusters` section of both async and synchronous search responses elastic/elasticsearch#97731
Updates the spec for the response objects for `POST _async_search`, `GET _async_search/:id`, `GET _async_search/status/:id` and `GET _search` Two high level changes have happened in 8.10: 1) `completion_time` and `completion_time_in_millis` (async_search only) elastic/elasticsearch#97700 2) Adding `details` metadata to the `_clusters` section of both async and synchronous search responses elastic/elasticsearch#97731
Updates the spec for the response objects for `POST _async_search`, `GET _async_search/:id`, `GET _async_search/status/:id` and `GET _search` Two high level changes have happened in 8.10: 1) `completion_time` and `completion_time_in_millis` (async_search only) elastic/elasticsearch#97700 2) Adding `details` metadata to the `_clusters` section of both async and synchronous search responses elastic/elasticsearch#97731
Updates the spec for the response objects for `POST _async_search`, `GET _async_search/:id`, `GET _async_search/status/:id` and `GET _search` Two high level changes have happened in 8.10: 1) `completion_time` and `completion_time_in_millis` (async_search only) elastic/elasticsearch#97700 2) Adding `details` metadata to the `_clusters` section of both async and synchronous search responses elastic/elasticsearch#97731
Updates the spec for the response objects for `POST _async_search`, `GET _async_search/:id`, `GET _async_search/status/:id` and `GET _search` Two high level changes have happened in 8.10: 1) `completion_time` and `completion_time_in_millis` (async_search only) elastic/elasticsearch#97700 2) Adding `details` metadata to the `_clusters` section of both async and synchronous search responses elastic/elasticsearch#97731 Co-authored-by: Michael Peterson <[email protected]>
Both the async_search response and status response objects now include a "completion_time_in_millis"
entry in the XContent output if the search has completed successfully.
The completion_time is set as the start_time (already present) plus the 'took' time that is set in the
SearchResponse object and only if the isRunning status == false since took is set even for in-progress searches.
We use the 'took' field because it is based on relative time, not absolute wall clock time which can go
backwards due to NTP issues. See the comments in TransportSearchAction about the SearchTimeProvider
for details.
Closes #88640