Delay partial results#141073
Merged
chrisparrinello merged 59 commits intoelastic:mainfrom Feb 17, 2026
Merged
Conversation
c60caf6 to
d5aae4d
Compare
quux00
requested changes
Feb 13, 2026
Contributor
quux00
left a comment
There was a problem hiding this comment.
Minor nit left on code comments and request to remove the changes to SearchResponseMerger (communicated via DM). After that I think I can approve.
| int totalShards = numShards + numSkippedShards; | ||
|
|
||
| // Ensure that given partial results from shard searches, the result we send to the listeners does not contain partial results | ||
| // because partialResultsSupressed is set to true. Passing partialResultsSupressed set to true in the assertCompletionListeners |
Contributor
There was a problem hiding this comment.
nit: "partialResultsSupressed" is misspelled twice here and in the comments below.
chrisparrinello
added a commit
that referenced
this pull request
Feb 23, 2026
…ts (#142875) Change from partial_results to return_intermediate_results #141073 introduced a new query parameter to allow clients to decide whether or not intermediate results should be returned when getting async search results if the query is not complete. The initial Github issue asked for a partial_results query parameter but it was decided to change it to return_intermediate_results. That change was made in the PR in all places except for RestGetAsyncSearchAction. This PR corrects that oversight.
jdconrad
pushed a commit
to jdconrad/elasticsearch
that referenced
this pull request
Feb 24, 2026
…ts (elastic#142875) Change from partial_results to return_intermediate_results elastic#141073 introduced a new query parameter to allow clients to decide whether or not intermediate results should be returned when getting async search results if the query is not complete. The initial Github issue asked for a partial_results query parameter but it was decided to change it to return_intermediate_results. That change was made in the PR in all places except for RestGetAsyncSearchAction. This PR corrects that oversight.
sidosera
pushed a commit
to sidosera/elasticsearch
that referenced
this pull request
Feb 24, 2026
…ts (elastic#142875) Change from partial_results to return_intermediate_results elastic#141073 introduced a new query parameter to allow clients to decide whether or not intermediate results should be returned when getting async search results if the query is not complete. The initial Github issue asked for a partial_results query parameter but it was decided to change it to return_intermediate_results. That change was made in the PR in all places except for RestGetAsyncSearchAction. This PR corrects that oversight.
3 tasks
drewdaemon
added a commit
to elastic/kibana
that referenced
this pull request
Apr 10, 2026
## Summary Close #229903 Close #186145 This PR implements two key (async) search performance optimizations related to polling. 1. When the browser is using a protocol which supports multiplexing, Kibana-side sleeps are eliminated and long-polling is used, ensuring results are delivered as soon as possible. 2. One of the Elasticsearch requests that used to happen after polling has been removed. ## Reviewer notes `retrieveResults` has been renamed to `returnIntermediateResults` to match the Elasticsearch [parameter name](elastic/elasticsearch#141073), but should be functionally identical. ## Settings behavior ### `wait_for_completion_timeout` ```mermaid flowchart TD Start[Start] --> Phase{Phase?} Phase -->|Initial Submit| SubmitConfig[Use search.asyncSearch.waitForCompletion] Phase -->|Polling GET| ClientConfig{search.asyncSearch.pollLength set?} ClientConfig -->|Yes - Number| UseClientConfig[Use config value] ClientConfig -->|No| Multiplex{Is the browser using HTTP/2 or<br/>HTTP/3?} Multiplex -->|Yes| Use30s[Use 30000ms] Multiplex -->|No| Undefined[Omitted - functionally zero] ``` ### `pollInterval` ```mermaid flowchart TD Start[Start] --> ConfigSet{search.asyncSearch.pollInterval set?} ConfigSet -->|Yes| UseConfig[Use config value] ConfigSet -->|No| CheckMultiplex{HTTP/2 or<br/>HTTP/3?} CheckMultiplex -->|Yes| UseZero[Use 0ms] CheckMultiplex -->|No| CheckStatic{Static value<br/>provided?} CheckStatic -->|Yes| UseStatic[Use that value] CheckStatic -->|No| ElapsedTime{Elapsed time?} ElapsedTime -->|< 1.5s| Use300[300ms] ElapsedTime -->|< 5s| Use1000[1000ms] ElapsedTime -->|< 20s| Use2500[2500ms] ElapsedTime -->|>= 20s| Use5000[5000ms] ``` ### Checklist - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks The main risk is if an on-prem deployment has for some reason configured aggressive network timeouts and also has HTTP/2 enabled for browser communication, they may see timeout errors after upgrading. - has set `elasticsearch.idleSocketTimeout` or `server.socketTimeout` to a value less than 30 seconds. - uses a proxy that has a timeout configured at less than 30 seconds. In all these cases, the user can fix the behavior by raising the interfering timeouts (preferred) or by tuning down the poll length via `kibana.yml`. ### Release note Sped up fetching Elasticsearch data for setups using HTTP/2 as the browser's communication protocol. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Stratou <efstratia.kalafateli@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #139828.
Implements a new query param,
partial_results, on_async_search/{id}to not calculate or return partial results if the query is still running. The query param defaults totrueif not specified in the request. Ifpartial_resultsis true and the search is still running, the search response will include any hits and partial aggregations that are available. Ifpartial_resultsis false and the search is still running, the search response will not include any hits (but possibly include total hits) nor will include any partial aggregations.Once the search is complete, the response will include the final results if successful or the partial results in the case of a failure. This is the same behavior as before the implementation of the
partial_resultsquery param.